I have a really weird issue that just occurred on a client site.

I updated the permalink structure from /%category%/%postname%/ to /%postname%/ and suddenly my pages don't respect templates and are defaulting to index.php.

What else is strange is index.php is attempting to display the latest blog post of the site and not the actually page you are on, for example /about-us/ is not using template-about.php it is using index.php with the latest blog post content.

I have deleted and rebuilt the htaccess file, flushed the rewrite rules and nothing is happening.

If I set permalinks to Default(/?p=123) the site works just fine.

Does anyone have any ideas? I am at the end of this very large project and I have no idea what to do!


  • Can we see a live link to the site in question? Also: please be sure that you are calling body_class() inside the HTML <body> tag. (This is very important to resolving your issue.) – Chip Bennett Nov 23 '12 at 20:46
  • Additional things to include in your question: 1) What Theme are you using? 2) What are your Front Page settings under Dashboard -> Settings -> Reading ("Front page displays", "page on front", and "posts page") 3) What custom page templates do you have assigned to any relevant static pages (if any)? – Chip Bennett Nov 23 '12 at 20:47
  • Im using a custom theme. The dev link is here - ehealth.cnkt.ca Click any top level nav item, the site is not picking up the assigned template files.. – Darren Cooney Nov 23 '12 at 20:52
  • It is reverting to index.php Keep in mind this just changed after I updated the permalinks. Front page is set to template-home.php – Darren Cooney Nov 23 '12 at 20:53
  • Please ensure index.php uses body_class(). Also: What are your Front Page settings? – Chip Bennett Nov 23 '12 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.