Removing CPT base in URL that includes a taxonomy returns 404 error
-
Hi,
I used this pluging to remove the base but it returns a page not found.
initial url:
http://www.mydomain/restaurants/chicago/mollys-dinner
where:
restaurants is CPT slug
chicago is taxonomy (city)
I would like to remove the base to have just:
http://www.mydomain/chicago/mollys-dinner
but i have a 404 error
Can you help?
Thanks
Hi,
how did you setup this URL?
Can you send me instructions how can I replicate your environment?
I mean … whether you use some CPT plugin or manually write code to create taxonomy and CPT, what is your Permalink settings, etc…
-
This reply was modified 2 years, 11 months ago by
kubiq.
Hi,
I use CPT UI for creating custom post types.
I just use plugins, no writing code.
I have a Custom post type called “Restaurant” and a taxonomy called “City”.
I use this plugin “Custom Post Type Permalinks” to add the taxonomy to the permalink structure:
https://www.mywebsite/restaurant/%city%/%postname%/
Your plugin removes the base of the CPT and the new permalink becomes:
https://www.mywebsite/%city%/%postname%/
but this link doesn’t work anymore and return a 404 error and i want my URL to work this way.
(ex: https://www.mywebsite/chicago/mollys-dinner) and not (https://www.mywebsite/restaurant/chicago/mollys-dinner)
Thank you
Can you test this?
Download: https://files.kubiq.sk/remove-cpt-base.zip
Unzip it and replace /wp-content/plugins/remove-cpt-base/remove-cpt-base.php
Let me know, it should work I just tested it, so if you confirm it, then I will release new version 5.3 😉
Still nothing, same 404 problem.
Are you using WPML or Polylang? Because I see there is problem with these plugins.
Try this second version: https://files.kubiq.sk/remove-cpt-base-v2.zip
It’s Working!
Thank you for you big help and excellent support!
great 😉
so version 5.3 in available
you can leave some review if you want:
https://wordpress.org/support/plugin/remove-cpt-base/reviews/#new-post
Fantastic!
I left a review, thank you for your big help and awesome support!
- You must be logged in to reply to this topic.