Taxonomy doesn’t follow slug permalink structure

I started with a fresh template and added a Post Type according to specification at GenerateWP.

I then added a taxonomy to the custom post type, also according to the above-referenced website:

// Register Custom Taxonomy
function addIssuesTaxonomy() {

$labels = array(
‘name’ => _x( ‘Issues’, ‘Taxonomy General Name’, ‘text_domain’ ),
‘singular_name’ => _x( ‘Issue’, ‘Taxonomy Singular Name’, ‘text_domain’ ),
‘menu_name’ => __( ‘Issues’, ‘text_domain’ ),
‘all_items’ => __( ‘All Issues’, ‘text_domain’ ),
‘parent_item’ => __( ‘Parent Issue’, ‘text_domain’ ),
‘parent_item_colon’ => __( ‘Parent Issue:’, ‘text_domain’ ),
‘new_item_name’ => __( ‘New Issue Name’, ‘text_domain’ ),
‘add_new_item’ => __( ‘Add New Issue’, ‘text_domain’ ),
‘edit_item’ => __( ‘Edit Issue’, ‘text_domain’ ),
‘update_item’ => __( ‘Update Issue’, ‘text_domain’ ),
‘view_item’ => __( ‘View Issue’, ‘text_domain’ ),
‘separate_items_with_commas’ => __( ‘Separate issues with commas’, ‘text_domain’ ),
‘add_or_remove_items’ => __( ‘Add or remove issues’, ‘text_domain’ ),
‘choose_from_most_used’ => __( ‘Choose from the most used’, ‘text_domain’ ),
‘popular_items’ => __( ‘Popular Issues’, ‘text_domain’ ),
‘search_items’ => __( ‘Search Issues’, ‘text_domain’ ),
‘not_found’ => __( ‘Not Found’, ‘text_domain’ ),
‘no_terms’ => __( ‘No items’, ‘text_domain’ ),
‘items_list’ => __( ‘Issues list’, ‘text_domain’ ),
‘items_list_navigation’ => __( ‘Issues list navigation’, ‘text_domain’ ),
);
$rewrite = array(
‘slug’ => ‘issues’,
‘with_front’ => true,
‘hierarchical’ => false,
);
$args = array(
‘labels’ => $labels,
‘hierarchical’ => true,
‘public’ => true,
‘show_ui’ => true,
‘show_admin_column’ => true,
‘show_in_nav_menus’ => true,
‘show_tagcloud’ => true,
‘rewrite’ => $rewrite,
);
register_taxonomy( ‘issues’, array( ‘articles’ ), $args );

}
add_action( ‘init’, ‘addIssuesTaxonomy’, 0 );

I then saved the permalinks in this structure http://xxx/sample-post/, but no matter what, the newly added taxonomy does not show up at http://xxx/issues. Instead I get a 404. Navigating to /articles/issues/ also results in 404.

What am I missing in order to display all issues found in the newly created taxonomy?

Read more here:: Taxonomy doesn’t follow slug permalink structure

Leave a Reply

Your email address will not be published. Required fields are marked *