[Pro] custom field on venue map

This topic contains 2 replies, has 2 voices, and was last updated by  José Morin 9 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #16094

    Hi,

    In the venue map, is it possible to display only venues selected by custom field?
    I can easily query venues matching certain meta data, but I don’t see how to display this selected venues in a map.

    Thanks in advance!

    José Morin
    #16103

    Hi José,

    You can change the content of the venue tooltip using the eventorganiser_venue_tooltip filter: http://codex.wp-event-organiser.com/hook-eventorganiser_venue_tooltip.html (documentation, with exmaple).

    You can retrieve meta value(s) for a meta key using the function eo_get_venue_meta() (see codex).

    Does that help?

    Stephen Harris
    #16180

    Thanks for your answer.

    Here is the solution I finally used:

    <?php
    $venue_query = array(
        array(
           'key' => '_open',
           'value' => '1'
        )
    );
    $venues = eo_get_venues( array( 'meta_query' => $venue_query ) );
    if( $venues ){
        $venue_slugs = array();
        foreach($venues as $venue){
            $venue_slugs[] = $venue->slug;
        }
        echo eo_get_venue_map($venue_slugs);
     }
    ?>
    
    José Morin
Viewing 3 posts - 1 through 3 (of 3 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.