Home › Forums › General Issues › Post Object with Multiple Select › Reply To: Post Object with Multiple Select
You can first get all the sectors by performing a
get_posts – http://codex.wordpress.org/Template_Tags/get_posts
Loop over these results, and for each sector display the title and link.
To find the count of jobs in this sector will require another
get_posts call for each sector.
The post_object (multi-select) saves it’s data in the same format of a relationship field (serialized array of IDs), so you can follow this tutorial to perform a backwards query: http://www.advancedcustomfields.com/resources/tutorials/querying-relationship-fields/
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
🚀 This week’s session of ACF Chat Fridays dips into the preliminary results of our first ever user survey. Don’t miss it! https://t.co/3UtvQbDwNm pic.twitter.com/kMwhaJTkZc— Advanced Custom Fields (@wp_acf) May 9, 2023
© 2023 Advanced Custom Fields.