How to add venue and category to event data?

WordPress Event Management, Calendars & Registration Forums General Question How to add venue and category to event data?

This topic contains 0 replies, has 1 voice, and was last updated by  Lynne 9 years, 7 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #18541

    Hi,
    First off, thanks so much for this great plugin. Your code and comments have been very helpful getting me started with Word Press programming.

    I’m adding a rest api and am wondering how do I get the venue data and category for events when retrieving events using the following code:

    $events = new WP_Query( array(
        'post_type' => 'event',
        'orderby' => 'distance',
        'venue_query' => array(
             'center' => eo_remote_geocode( "Seattle, WA" ),
             'distance' => 20,
             'unit' => 'miles',
             'compare' => '<='
         ),
         'event_start_after' => 'today'));
    

    Interestingly, when using the rest api v1 plugin, the post data returned included the nested ‘event-venue’ and ‘event-category’ data but after upgrading to v2, the post data no longer contains the event category or venue data.

    Lynne
Viewing 1 post (of 1 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.