Tuesday, 28 May 2013

Change in custom taxonomy permalink cause 404 error for another custom taxonomy

Change in custom taxonomy permalink cause 404 error for another custom taxonomy

I have created hierarchy based custom permalinks with help of this link.
But now it is causing 404 error on another custom taxonomy used in site. Although I want custom permalinks on this taxonomy also, but if I don't use any rewrite argument and leave it on its default permalink it is still not working. My code for second taxonomy is this:
register_post_type( 'gallery',
    array(
        'public' => true,
        'menu_position' => 15,
        'supports' => array( 'title', 'editor', 'comments', 'thumbnail' ),
        'taxonomies' => array( '' ),
        'menu_icon' => get_template_directory_uri().'/img/icon_gallery.png',
    'register_meta_box_cb' => 'add_gallery_metaboxes'
    )
);
register_taxonomy('gallery_category','gallery',array( 'hierarchical' => true, 'labels' => $labels ));

No comments:

Post a Comment