I have created a custom php form, And Also custom post type. now I need to make new metadata for custom posttype same as the contact form fields an make custom post type listing in backend.
I have created a custom php form, And Also custom post type. now I need to make new metadata for custom posttype same as the contact form fields an make custom post type listing in backend.
Comments
I am trying to remove the slug of my custom post type in the URL of WordPress but keep the taxonomy slugs in place.
The taxonomy is hierarchical so there needs to be the option of having both taxonomy slugs in the url.
For example, I need to recreate the following
Current
/product/balustrades/{CPT item}
Required
/balustrades/{CPT item}
/balustrades/glass/{CPT item}
Removing the CPT slug is relatively straight forward, and I can get the URLs to display exactly as I need them. However, I am getting a 404 when trying to access the pages. I have read in numerous places that this is to do with redirects needing to be put in place but the snippets I have come across don't seem to solve my issue. Here is what I currently have
Remove slug:
Custom post types/taxonomy:
I also have a rewrite in my permalink settings as showing here
Any help is much appreciated!
Add Comment