Support » Plugin: Event Organiser » Query Venues by Country

  • Guillermo

    (@guillermovargasquisoboni)


    Hello,

    I am creating a template for displaying a list of venues by country, but the code on the documentation is not working for this. With the same code, I can make a list of venues without filters, and ‘orderby’ countries.

    I wonder if I have a problem with the query or if it is not possible to use this query with eo for amateurs. 🙂

    The query that I am using is :

    $venue_query = array(
        array(
           'key' => '_country',
           'value' => 'Alemania',
        )
     );                
    $venues = eo_get_venues( array( 'meta_query' => $venue_query ) );
     
     if( $venues ){
             echo '<ul>';
             foreach($venues as $venue):
                $venue_id = (int) $venue->term_id;
                
                  printf('<li> <a href="%s">%s</a>', eo_get_venue_link($venue_id), esc_html($venue->name));
                
             endforeach;
             echo '</ul>';
        }    
    • This topic was modified 1 year, 7 months ago by  Guillermo.
Viewing 1 replies (of 1 total)
  • Plugin Author Stephen Harris

    (@stephenharris)

    Hi – do you have the Pro plugin installed and activated? Venue meta queries are provided in the Pro extension.

Viewing 1 replies (of 1 total)
  • The topic ‘Query Venues by Country’ is closed to new replies.