Hi @mypixel, sorry to revive this old post but I used your snippet successfully and it works. I’m facing some issues with it though and want to see if you can help me.
The code works perfectly until you paginate stuff. Let’s suppose that you have a custom post type and you list all posts with a regurlar WP_Query, then if you paginate it and you’re in page 2 this won’t show anything when you try to apply filters.
I also added infinite scroll (which is the way I want to do) to this applied to the .target div. It makes that the URL doesn’t change so I’m able to go to the archive even if I’m on page 3.
The issue under this setup is that when you applied filters and then you get paginated results, when you scroll down to make infinite start working it starts querying posts outside the chosen taxonomies filter/s.
If you want to take a look at my code please let me know and I will be happy to show you.
Thanks!