Support » Plugin: Events Manager » Events Manager: Get events by location

  • Resolved wenkunst

    (@wenkunst)


    I have a very simple question: I want to show all events at a certain location.

    Like showing all events with a certain band playing:

    
    $args = array(
        'post_type'     => 'event',
        
        'tax_query'     => array(
        		array(
        			'taxonomy' => 'band',
        			'field'    => 'name',
        			'terms'    => $term->name,
        		),
        	),
    
        'orderby'       => array( '_event_start_date' => 'ASC'),
        'posts_per_page'=>-1
    );
    
    $query = new WP_Query( $args);
    

    I tried with taxonomy and meta keys but I think locations are stored different in the database?
    Any help would be very helpful!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Events Manager: Get events by location’ is closed to new replies.