1

On my site, all top-level pages (i.e. mydomain.com/example-page as opposed to mydomain.com/parent/example-page) will only use index.php as their template. They won't use page.php, they won't use custom selected templates; only index.php

This only applies with I use %postname% as the permalink type.

I've tried re-saving the permalinks to flush them, but to no avail.

Any ideas?

UPDATE: It appears that if I change the permalink to: mysite.com/1/%postname% (rather than /%postname%), it works--and pages still actually use their default /%postname% format.

It appears that all pages are expected--by the system--to be posts. When the post is not found, it shows the index.php page. When I add the /1/ (or any number/string) to the front of the permalink, it helps the system to know that if that isn't there, the pages are actually pages, and they work.

Why is that the case?!

1 Answer 1

2

I had the same issue and your fix helped me a lot.

After I fixed the issue with your solution I figured out that I had used a permalink in one custom post type that caused the issue.

I used years / year and I think because wordpress uses something like this in its archive pages it broke the site.

Probably this helps you also.

1
  • I had the same issue and it was driving me crazy - nothing helped. Thanks pointing out I had the same years / year taxonomy and it seems that might be the cause Commented Jul 12 at 8:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.