I have a custom post type(product) with taxonomy product-type
. One of my url like this:
http://www.naturesbioscience.com/product-type/immune-support-supplements/
I want this like:
http://www.naturesbioscience.com/immune-support-supplements/
I have used "rewrite" => array('slug' => '/ ', 'with_front' => false
in register_taxonomy
function and I got the url like:
http://www.naturesbioscience.com/immune-support-supplements/
But I got 404 not found in other pages.
Anyone can help me?
I think you forgot to rewrite custom taxonomy post slug.
Write this in your
register_post_type
methord.Now you have to remove
product-type
slug from your custom productsNow as you have removed the custom post type slug so WordPress will try to match it with page or post so you have tell WP to check the URL in you custom post type also. So use this for that:
Reference: Remove The Slugs from Custom Post Type URL
Hope this helps!