Thank you in advance for any assistance. Building a wordpress template and i have a section for Locating Representatives based on state. So i have set up a custom post type called Reps and am using custom fields to populate the contact info of each representative, along with a checkbox selector for which states that person is assigned to (some representatives are assigned to multiple states).
On the Rep Locator page I have a div with a list of links, one for each state, and then a content display div that will hopefully list any Reps posts that have that state assigned to them with the ACF checkbox selector. What's the simplest way to populate that content div with the Reps posts' content based on which state link the user clicks. Don't want to make a new page for each state in the USA to manually query the posts' content.
I thought about trying to pass PHP variables in the urls of the links, like /rep-locator.php?state=california ... is there any way to do this with links in a wordpress template? Or would something like AJAX be a better fit (probably over my head at this point)?
Hopefully this makes sense, and thank you very much for any consideration!