• Hello, i searched for this query and found this piece of code.

    $edinburgh_events = new WP_Query( array(
           'post_type' => 'event',
           'venue_query' => array(
                array(
                    'key' => '_city',
                    'value' => 'Edinburgh'
                )
            ),
            'event_start_after' => 'today'
     ));

    It says it works with eo_get events too, but for me it does not work at all, the query returns all events. Any help?

    $eventss = eo_get_events(array(
             'numberposts'=>4,
             'event_end_after'=> 'today',
             'event_start_before'=> 'this Sunday',
             'showpastevents'=>false,//Will be deprecated, but set it to true to play it safe.
    		 'venue_query' => array(
                array(
                    'key' => '_city',
                    'value' => 'Cluj'
                )
            ),
        ));

    https://www.ads-software.com/plugins/event-organiser/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get events by venue city’ is closed to new replies.