I have an archive page for a custom post type (CPT) on which I'm trying to do two things:
Display a list of terms that are in the taxonomy associated with the CPT,
Use these terms to dynamically change a wp_query that will be displayed on the same page.
For example, my custom post type is 'Read'. I have a custom taxonomy of 'Reading' associated with it, and several terms such as 'Series', 'Messages', 'Special Services', etc.
I would like to use the listed terms as a way to update what is being displayed in the loop (i.e. if someone clicks 'Series', the loop will only show posts that are in 'Series', if they click 'Messages' the loop will then update and show only the posts in 'Messages', etc.).
I've successfully listed the terms using the 'get_terms' function. However, I have no idea how to make these terms dynamically change what is being displayed in the loop (I'm using a new wp_query).
How can I allow a user-selected term to dynamically (via ajax?) update the query being displayed?
I appreciate any help you can give me!