Query Venues by Country
-
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>'; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Query Venues by Country’ is closed to new replies.