WordPress custom taxonomy term page not found

For some reason when I click the link to a taxonomy term page, wordpress keeps displaying the index file and says page not found. I have a page with the slug “contributors” using a template that displays the terms of the custom taxonomy “contributor) with a link to it’s page, so I click the link and the error occurs.


This is my functions.php code for adding the taxonomy:

Read More
register_taxonomy(
    'contributor',
    'post',
    array(
        'hierarchical' => true,
        'labels' => array( 
             'name' => _x( 'Contributors', 'taxonomy general name' ), 
             'singular_name' => _x( 'Contributor', 'taxonomy singular name' ), 
             'search_items' => __( 'Search Contributors' ), 
             'all_items' => __( 'All Contributors' ), 
             'parent_item' => __( 'Parent Contributor' ), 
             'parent_item_colon' => __( 'Parent Contributor:' ), 
             'edit_item' => __( 'Edit Contributor' ), 
             'update_item' => __( 'Update Contributor' ), 
             'add_new_item' => __( 'Add New Contributor' ), 
             'new_item_name' => __( 'New Contributor Name' ), 
             'menu_name' => __( 'Contributors' ), 
         ),
        'show_tagcloud' => true
    )
);

Does anyone know why, even when including a file called taxonomy-contributor.php, the error still occurs?

Related posts

Leave a Reply

2 comments

  1. Seems you need to flush rewrite to get it to work

    add_action('init', 'custom_taxonomy_flush_rewrite');
    function custom_taxonomy_flush_rewrite() {
        global $wp_rewrite;
        $wp_rewrite->flush_rules();
    }
    
  2. i had a simular problem. what helped me was to flush permalinks after including the taxonomie links in the menu by going to Settings / Permalinks and simply saving.