I am having a strange problem with a site I am currently building. I will try to give as much detail as possible in the hopes that somebody is able to figure out what is causing this :)
Overview of the problem
Each time I update a page, all the pages on my site except the homepage, start using the index.php template. Even when pages have a template assigned to them, they still revert to the index.php template.
To fix it, I need to change the permalinks to default, save it, and then put them back to my custom setup which is category/postname. Though next time I update a page, it happens again.
Plugins & Post Types I am using the following plugins, not sure if any of this matters.
- Advanced Custom Fields
- Custom Post Type UI
I used Custom Post Type UI to create five custom post types and ten custom taxonomies. For the custom post types, I am using the following settings:
- all names start with ph_ to keep things unique and not cause conflicts
- Public, Show UI, Has Archive, Hierarchical and Rewrite are all set to True
The rewrite slugs being used are:
ph_slider/ph_slider (no change)
I also have pages with the following names/slugs
Boiler Services/boiler-services (plural, post type rewrite is singular)
New Commercial Boilers/new-commercial-boilers
Rental Commercial Boilers/rental-commercial-boilers
Used Commercial Boilers/used-commercial-boilers
Obviously, some of the names are similar between post types and pages but they are not the same and should not cause a conflict.
Does this make sense to anyone? I can supply access to the WP site if needed. I am stuck and can't figure this out. I have setup a number of sites with custom post types in the past and have never run into this issue.
I really appreciate any help that you can give. If you need additional information, let me know and I will be glad to supply it.
EDIT - more details
I meant to include, when I deactivate Custom Post Type UI, I can edit a page and the templates stay correct. Once I activate it again though, everything breaks on an update. So I have narrowed it down to definitely being the cause of the problem - but why?
EDIT - figured it out
I had a custom taxonomy with the name "year", after renaming that everything seems to be working. Sorry for not realizing that from the start, but maybe somebody will come across this when they have a problem and know the reason now :)