WordPress taxonomy.php not working for custom taxonomy

1.5k views Asked by At

I have a custom post type "certificates" & I have a custom taxonomy "certificate_category" that registered for "certificates" custom post type. here is my definition of taxonomy:

$args = array(
        'labels' => $labels,
        'hierarchical' => true,
        'show_ui' => true,
        'show_admin_column' => true,
        'query_var' => true,
        'rewrite' =>array( 'slug' => 'topics' )
    );
        register_taxonomy('certificate_category', 'certificates', $args);

This taxonomy has two terms with names "international" & "interior". I have created taxonomy.php for display "certificate_category" taxonomy (international & interior have same template).

The url for "internatonal" term is mysit/topics/international & for "interior" term is mysit.com/topics/interior and they both redirect to index.php.

What should I do to show taxonomy.php ?

1

There are 1 answers

6
steakoverflow On

You shouldn't have to change any settings in the permalinks section, just visit it, then try opening /topics/international. The template you need is just taxonomy.php. I created a site with such configuration, and it worked on 1st try. Do you have any posts in any of the taxonomy terms?