Skip to main content
2 of 5
added 4 characters in body
kaiser
  • 50.8k
  • 27
  • 150
  • 244

How to query custom post then display sections by meta value

This seems like an easy thing to do but I am missing something here. I have a custom post type called "recipient" and a meta check box called "yes_current" - (we help children with cancer and run events for them so we need to know who is a current recipient and who is a past recipient.) We want to display two sections on our RECIPIENT page: CURRENT RECIPIENTS and PAST RECIPIENTS.

My thought is to query the loop to get all of the custom_post_types that equal recipient, then display the featured image for all CURRENT recipients (if yes_current is ON) in the Current section, then do the same for PAST recipients in the Past section.

Thank you guys!