Support

Account

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?