I have a mystery. My index.php file displays the usual header, posts loop in content, sidebar and footer. It works fine when I navigate to a page that has no template file.
When I copy the contents of index.php and past them into a template file (page-shows.php) and then navigate to the page “shows”, I do not see any posts. Everything else is there, just no posts.
There is absolutely no difference between these two files except their names.
What am I missing? What is WordPress doing when the template defaults to the index.php file that it is not doing when it finds a template?
- The topic ‘index.php and an identical template’ is closed to new replies.