Home › Forums › Front-end Issues › Include meta added via relational post object in an existing query function › Reply To: Include meta added via relational post object in an existing query function
You have a couple of problems here
First is that $query->get( 'organizer' )
is returning nothing because it is not set. It appears that this has been changed to tribe_organizer
. You’d thing they would tell you this after looking at your code. So, I don’t think that your condition is ever being met. Try this to find out
if ( $query->tribe_is_event_query && $query->get( 'organizer' ) != '' ) {
echo 'query var set'; die;
I think that the second issue is that this value contains a holding a name and you are querying a post object field that contains a post ID.
You need the post ID for this organizer and not the name.
Not sure how to solve this.
Tell me more about this query we’re trying to modify, it is a sub query? The information for the organizer has already been shown and now you are trying to show the events that they are organizing?
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.