I am working on a classifieds website that has a custom taxonomy called 'countries'. In the main header menu I have these categories showing in a dropdown list of particular countries people can browse the site by.
How would I basically make it so when someone selects their country, it sets a session variable and or cookie with their location and from there on, every part of the site that shows a listing will use this value in a custom WP_Query to only query posts of that particular country?
So someone comes to the homepage, selects their country and then the page reloads with their chosen country for every page load thereafter.