In WordPress, I’ve changed the general settings for my web site to use a static page, pointing the Front page to a custom page called ‘Home’ which inherits from a template page called tpl-home.php and I set the Blog to a custom page, called ‘Blog’ which inherits from my default blog.php page.

However, when I browse to Blog, it shows up the blog posts, but within the index.php page? I’ve googled this, as it’s a common bug that developers run into, but none of the recommended solutions work.

How do I know it’s the index page if it shows the blog posts? I echo ‘Index’ in the index.php page :D.

SOLUTION:

If you need to find out which template is used for the current page being displayed, you can pate the following code in your functions.php.

add_action('wp_head', 'show_template');
function show_template() {
    global $template;
    print_r($template);
}

Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , ,

Wordpress related questions and answers: