• Resolved gjv

    (@garethjohnvaughan)


    I have a directory website that lists accommodation that is for rent, B&B etc. I use the Events Manager plugin to show what’s going on.

    The accommodation data is stored in a custom post type with its own metadata, with address field.

    Is it possible to search ‘nearby’ events in a radius of say 5 miles of the accommodation in a list or on the map using the Events Manager plugin or if it was custom code would it rely on Google maps api?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    you can try to check option under Events > Settings > Formatting > Search Form > Geolocation Search

    Thread Starter gjv

    (@garethjohnvaughan)

    Thanks, although I really need to be able list the events on the page already than have a search form.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    you can use events_list shortcode with search attributes near_unit and near_distance

    https://wp-events-plugin.com/documentation/event-search-attributes/

    Thread Starter gjv

    (@garethjohnvaughan)

    Thank you, that’s great, I’ve managed to get the list displaying using a shortcode, based on the lon/lat of the post in question:

    $strShortcode = ‘[events_list limit=’ .$limit . ‘ near_distance=’ . $distance . ‘ near=”‘ . $lat . ‘,’ . $lon .'”]’;

    This list is using the modified ‘events-list.php‘ now moved to my child theme ‘plugins > events-manager > templates‘. As the list is being shown in a sidebar widget is there a way of swapping the content of the output, I suppose I’d like to edit the table itself and variables, but this events list is also being used on my main listing page, so I can’t edit one without breaking the other.

    if( get_option(‘dbem_css_evlist’) ) echo “<div class=’css-events-list’>”;
    echo EM_Events::output( $args );
    if( get_option(‘dbem_css_evlist’) ) echo “</div>”;

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Nearby Events’ is closed to new replies.