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)

2012-09-07

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.

2012-09-07

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).

2012-09-07

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>

2012-09-08

BriceLucas answers:

Hey overhaul, what, specifically, are you wanting the URL to be? http://www.mywebsite.com/intelligence/intelligence/intelligence?


Overhaul Media comments:

http://website.com/intelligence/sub-category/post-name

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

2012-09-10

Francisco Javier Carazo Gil answers:

Have you tried this plugin? http://wordpress.org/extend/plugins/custom-post-type-permalinks/


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="http://wordpress.stackexchange.com/questions/16902/permalink-rewrite-404-conflict-wordpress-taxonomies-cpt/16929#16929"]]at the link[[/LINK]].