Site icon Hip-Hop Website Design and Development

Reset filter on category archive in wordpress

I have a wordpress website with several posts divided in categories. On the frontpage I have links to the category archives which will go to url …/archives/specificcategory/. Let’s name the categories C1, C2, C3, C4.

On those categorypages I have an Ajax filter where you can apply several filters to filter the posts. The categoryfilter is shown as a radiobutton (it uses images as radio buttons). When i’m on …/archives/C1/ and I choose C2 in the dropdown, the posts that belong to the category C2 will show.

But, I also have a reset filters button which resets all the filters, thus resets the categories. But this will always show archives from category C1 when it resets, because that’s the origin url. Also when no categories are selected because of the filter reset.

Is there a way I can show all posts that belongs to all 4 categories when i’m resetting my filters?