Tag Info

Hot answers tagged

2

You need to add the following code to content-page.php in your theme folder. <?php the_author(); ?>


2

The rewrite rule already exists to handle those requests, it's for pagination of a single page post type. You can get the value of the page number with get_query_var('page'). You can render all pages with the same template by creating a page-{page-name}.php template file.


1

If I have understood correctly you should be able to edit your page template to include the below. I'm not sure on any plugin to do this though. More info: https://codex.wordpress.org/Function_Reference/get_the_author <?php $author = get_the_author(); echo "$author"; ?> ** This is untested


1

You need to include is_page() in your if statement : <?php if ( function_exists('yoast_breadcrumb') && is_page() && !is_page_template( 'single-course.php' ) ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } else { ?> <p id="breadcrumbs"><span xmlns:v="http://rdf.data-vocabulary.org/#"><span ...


1

On single custom post types using the single-course.php template I want a different breadcrumb option to happen is_page_template will not work on non-pages. If you're looking to tell if you're on a single custom post type page, you should use is_singular and pass in the custom post type name: if (function_exists('yoast_breadcrumb') && ...


1

Have you tried is_front_page()? It should do what you're looking to do. Unless you've set up front-page.php with the Page Template commented header syntax that identifies the file is a Page Template, I don't think you can use the is_page_template() or get_page_template() functions. As for the category page, if you are loading category-foo.php, then aren't ...



Only top voted, non community-wiki answers of a minimum length are eligible