Support » Fixing WordPress » 404 errors for Hierarchical Custom Taxonomies

  • I’m using custom taxonomies (product categories) for a custom post type (products) . I had experienced some conflicts with my pages and permalink structure and found this was causing 404 errors. So I have my taxonomy structure as follows:

    array (
    0 => ‘my_products’,
    ‘hierarchical’ => true,
    ‘label’ => ‘Product Categories’,
    ‘show_ui’ => true,
    ‘query_var’ => true,
    ‘rewrite’ => array(
    ‘slug’ => ‘products’,
    ‘with_front’ => false,
    ‘hierarchical’ => true
    ‘singular_label’ => ‘Category’)

    Original I had the slug as blank but this caused my pages to return 404 errors. So by adding in ‘products’ as the slug this issue is solved.

    The permalink structure I am using is: /%category%/%postname%/

    I can view my pages, the product archive and individual products. My custom taxonmies go 3 levels deep. For example:

    – Mens > Casual > Tops

    I can view any category at the third tier. Eg works. However or returns a 404 error.

    Interestingly if I ‘fake’ the address eg by putting in ‘z/z/’ (or anything with 2 slashes) it then works and returns the category with all the matching results.

    If I set ‘hierarchical’ => false then no categories work at all.

    Any help greatly appreciated.

  • The topic ‘404 errors for Hierarchical Custom Taxonomies’ is closed to new replies.