In my theme i have an archive template for a taxonomy (taxonomy-cat_projet.php), in this template a have a list of these taxonomies links to allow users to select a taxonomy. Here is the code i'm using to list categories links:
<ul> <?php $args = array( 'title_li' => '', 'taxonomy' => 'cat_projet', 'hide_empty' => false, ); wp_list_categories( $args ); ?> </ul>
Is there a way to once a category is selected, its link would change so that if it's clicked it lists posts from all categories. like, first click makes that category active, and the second time it's clicked it becomes inactive.