Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

CPT Page Slug Conflict WordPress

We have a custom post type named "intelligence" and a page called "intelligence" that houses the CPT data. We also have a category called Intelligence with sub-categories for each actual page.

We need the final URL's to be /intelligence/sub-cat/post-name

But it errors because of conflict, if we change the CPT name to "intel" it works fine with the path /intel/post-name.

I can show examples but prefer not to post the links here.

Answers (5)


Michael Caputo answers:

That's the best solution - changing the slug of the CPT to something other than the page name.. Or change the page slug to something else.

Theres no way around it unfortunately.


John Cotton answers:

It conflicts because WordPress uses regular expressions to determine which page the visitor wants to see. Your page/category/CPT names create ambiguous rules.

You could handle the redirects yourself if you really, really wanted to, but the code would be messy and what's the point in having a dog if you bark yourself?

Go with the solution you have (ie find an alternative slug for your CPT).


Jatin Soni answers:

As per my experience same page name with the register CPT won't work. Something is weird I could never understand. So better as Michel said change CPT slug with something else of I usually change page name with plural. In your case intelligences or something similar.

<blockquote>Do not forget to flush permalink whenever you change slug or page permalink otherwise it will gives you error.</blockquote>


BriceLucas answers:

Hey overhaul, what, specifically, are you wanting the URL to be?

Overhaul Media comments:

We need a page for "intelligence" and then sub category pages along with the singles


Francisco Javier Carazo Gil answers:

Have you tried this plugin?

Overhaul Media comments:

I did.. I don't really know how it will help.

I think it's something to do with the post types being pages and having a parent page the same as their CPT name?

Not too sure.

Francisco Javier Carazo Gil comments:

Have you tried to use this? use_verbose_page_rules look [[LINK href=""]]at the link[[/LINK]].