Custom Taxonomy Not Linking To Custom Post Types Archive Page
-
Hi Everyone,
I am pretty new to WordPress but have been picking it up pretty well but I have hit a problem getting my custom taxonomy get_categories to link to the custom post type archive page.
I have generated the following code which pull out the links for the custom taxonomy and they display perfectly
<?php //list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin) $taxonomy = 'music_genre'; $orderby = 'name'; $show_count = 1; // 1 for yes, 0 for no $style = 'list'; $titleli = ''; $args = array( 'taxonomy' => $taxonomy, 'orderby' => $orderby, 'show_count' => $show_count, 'style' => $style, 'title_li' => $titleli ); ?>
The problem I have is that this taxonomy relates to a custom post type call artists for which I have created a custom archive page call archive-artist.php but when I click on any of the links it takes me back to the default archive page instead of the custom one.
The links generated are the following:
<ul> <li class="cat-item cat-item-51"> <a title="View all posts filed under Rhythm and blues" href="https://wp_learning/index.php/music_genre/rhythm-and-blues/">Rhythm and blues</a> (1) </li> <li class="cat-item cat-item-52"> <a title="View all posts filed under Soul blues" href="https://wp_learning/index.php/music_genre/soul-blues/">Soul blues</a> (1) </li> <li class="cat-item cat-item-53"> <a title="View all posts filed under St. Louis blues" href="https://wp_learning/index.php/music_genre/st-louis-blues/">St. Louis blues</a> (1) </li> </ul>
Any help you can provide would be greatly appreciated! Thanks
- The topic ‘Custom Taxonomy Not Linking To Custom Post Types Archive Page’ is closed to new replies.