Hello,
I have a travel agency site. I created my custom fields to customize itineraries and departures. Each departure has a Post Object custom field called “itinerary” where user can links the departure with a specific itinerary. Now in that itinerary page I want to list all departures related with it. So I need to query all departures and fetch only those linked with that itineary.
Hope it is clear. How could I obtain something like this?
tks
Hi @jtpnet
This can be achieved by performing posts search via a WP_Query or get_posts.
Perhaps you could read up on this here:
http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/
The meta value will be the itinerary $post_id, and the meta key will be the name of the post object field.
Good luck
Thanks
E