I have the following bit of code:
<div class="container cat-list-container">
<ul>
<?php wp_list_categories( array(
'taxonomy' => 'project_categories',
'orderby' => 'id',
'hide_empty' => true,
'show_option_all' => 'All',
'title_li' => false
) ); ?>
</ul>
</div>
Which I'm using on a taxonomy archive page, taxonomy-project_categories.php - to show a list of category links.
The line: 'show_option_all' => 'All',
adds a link at the start of the list called 'All'.
However when clicked, thie link takes the user to the home page of the website and not back to the main 'Projects' page.
This 'All' link works when using this code with standard posts, but doesnt seem to work when using it with a custom taxonomy...
Can anyone help?
Just make has_archive
as true
in your project
custom posttype.
After adding this, change the permalink refresh.
This should work.
'has_archive' => true