I made the mistake of changing the slug of a custom post typem which created a new custom post type ‘animals’. I deleted that new CPT, and everything looks ok, except for some permalinks not working. I have a custom taxonomy for this post type ‘species’, and when I open ie domain.com/species/dogs, I get to see the dogs. But /species is returning an empty page, and so is the single custom post page. The url of this seems to be domain.com/animals/felix, but it shows a blank page. Trying only domain.com/animals or domain.com/felix don’t work, where domain.com/felix is redirected to domain.com/animals/felix, which is a blank page.
The posts are created with Formidable Pro. I checked all those fields, saved the settings again, updated the permalink structure, emptied the .htaccess before doing that, but nothing works. Not for old posts and not for newly created posts.
If you’ve changed the slug of an existing post type you can just change it back and all your content will still be there. A tip for the future is that you can, instead of changing the slug, change the rewrite slug. That’ll effectively make it appear as if the slug has been changed while you still maintain all your old posts etc.
What is your current post type now then? Your description is a bit confusing 🙂
Also, this isn’t really an ACF issue so I think you should post in the support forum for Formidable Pro as well 🙂
The actual name of my custom post is ‘dier’, with an hierarchical taxonomy ‘soort’. The post themselves are the names of the animals.
So I should be able to view domain.com/dier
and for the posts domain.com/felix
but I can’t. I will check on the Formidable Pro forum as well.
Something else I forgot to mention is that I added ‘post’ to the Custom Rewrite Slug field. I then realized that this was a mistake too, so I removed it again.
When I look at the database tables of the posts, in the column GUID I can see several different links. Some are formatted as /dier/felix, some as /post/dobey, but all belong to CPT ‘dier’.
Even changing the permalink structure in WP to default, links like domain.com/?dier=felix don’t work.
Okay. So any CPT created in WordPress has their permalink prepended with the CPT slug so your single page should be /dier/felix, not /felix. /dier should load your archive.php file in the theme and loop out all the posts ordered by date (provided archive.php has a regular loop).
I think you might have a permalink clash somewhere. Do you have a page with a slug of pier as well? That usually causes issues.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
© 2022 Advanced Custom Fields.