• Resolved amurado

    (@amurado)


    Hi,

    I currently have 3 different taxonomies for one of my CPT and two of them work fine, but one them always shows a 404 no matter what! I’ve tried changing the slug, updating permalinks, etc and it still doesn’t work. Below is what I’m using to register it:

    $labels = array(
    		'name'              => _x( 'Category', 'taxonomy general name' ),
    		'singular_name'     => _x( 'Category', 'taxonomy singular name' ),
    		'search_items'      => __( 'Search Categories' ),
    		'all_items'         => __( 'All Categories' ),
    		'parent_item'       => __( 'Parent Category' ),
    		'parent_item_colon' => __( 'Parent Category:' ),
    		'edit_item'         => __( 'Edit Category' ),
    		'update_item'       => __( 'Update Category' ),
    		'add_new_item'      => __( 'Add New Category' ),
    		'new_item_name'     => __( 'New Category' ),
    		'menu_name'         => __( 'Category' ),
    	);
    
    	$args = array(
    		'hierarchical'      => true,
    		'labels'            => $labels,
    		'show_ui'           => true,
    		'show_admin_column' => true,
    		'query_var'         => true,
    		'rewrite'           => array( 'slug' => 'type' ),
    	);
    
    	register_taxonomy( 'cs_category', array( 'case_studies' ), $args );

    Any ideas?

    I can send you a URL privately if needed.

    https://www.ads-software.com/plugins/beautiful-taxonomy-filters/

Viewing 1 replies (of 1 total)
  • Plugin Author Jonathandejong

    (@jonathandejong)

    Hi Amurado,

    Your issue is that you set a different rewrite slug but don’t change the query_var accordingly.

    $args = array(
    	'hierarchical'      => true,
    	'labels'            => $labels,
    	'show_ui'           => true,
    	'show_admin_column' => true,
    	'query_var'         => 'type',
    	'rewrite'           => array( 'slug' => 'type' ),
    );

    that should do it!

Viewing 1 replies (of 1 total)
  • The topic ‘404 on only one taxonomy’ is closed to new replies.