WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom taxonomy, which sets the with_front to false to try and get the URLs to look like /%type%/%brand%/%product%/, degrading as we go down. This however is driving me nuts. Everything in the code works, this works, but it causes every other page on the site to 404. I'd imagine the reason is something like with_front makes it think all requests are for elements of this taxonomy. But I can't work out how to fix it.

Just FYI, make labels is my lazy function that produces the labels we require for this.

register_taxonomy ('types','brands',
       'hierarchical' => false,
       'labels' => make_labels('Type'),
       'show_ui' => true,
       'query_var' => true,
       'rewrite' => array( 'with_front' => false, 'slug' => false)

$types = get_terms('types');

foreach($types as $type) {

Then we create the custom post types brands and products.

Driving me nuts! Thanks in advance.

share|improve this question

The answer to the question is in the two following posts:

Permalinks in Custom Post types

Remove taxonomy slug from a custom hierarchical taxonomy permalink

You need to ignore the automated rewriting, as I have done, but you need to add $wp_rewrite->use_verbose_page_rules = true; to the mix, otherwise your pages will conflict with the rewrite rules you have established for your taxonomy.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.