Filter by multiple meta key/value pairs
-
I am trying to filter my feed by two different meta values, where our site about voter redistricting where we need to filter by a single value in “state” (where state = 85) and where another thing is true (“congressional” = 1).
As I test these links, it seems like the last filter in the string is the one that gets applied, and the other one is ignored.
Congressional first, state second:
https://redistricting.lls.edu/?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=congressional&csrp_meta_value=1&csrp_meta_key=states_0_state&csrp_meta_value=85This returns all updates where state=85, but ignores congressional
State first, congressional second:
https://redistricting.lls.edu/?call_custom_simple_rss=1&csrp_posts_per_page=5&csrp_show_meta=1&csrp_meta_key=states_0_state&csrp_meta_value=85&csrp_meta_key=congressional&csrp_meta_value=1This one brings in all posts where congressional = 1, but for any state.
How can I “AND” together two different meta_value queries?
The page I need help with: [log in to see the link]
- The topic ‘Filter by multiple meta key/value pairs’ is closed to new replies.