Listing venues by province?
-
Hi,
I am looking to create a list of venues that are grouped by province e.g. London, Birmingham, Cardiff etc.
Is there a shortcode to allow them to be done individually?
Many thanks,
Kyle
-
Nope, unfortunately not. But there are functions available to do this in the Pro add-on: http://wp-event-organiser.com/pro-features/event-venue-queries/
Hi Stephen,
Thanks for your reply!
Definitely considering buying the pro license, though as my client is only looking to have a venue finder website, the event side of the plugin is somewhat redundant unfortunately.
With the pro version is there also the possibility of having a sizeable map of the UK with all venue locations pinpointed with links to the venue page within the tooltip? Or am I asking too much!?
Thanks again,
Kyle
Actually that’s possible with the free version…
[eo_venue_map venue="%all%" width="800px" height="800px"]
Unfortunately the ‘zoom’ attribute doesn’t (yet) work when displaying multiple venues.
Regarding altering the content of the venue tooltip, see http://wp-event-organiser.com/documentation/hook/eventorganiser_venue_tooltip/.
You can get the link to the venue page via: http://codex.wp-event-organiser.com/function-eo_get_venue_link.html
(As a bonus you can give venues custom markers too 🙂 http://wp-event-organiser.com/blog/tutorial/changing-the-venue-map-icon/ )
That’s brilliant.
I have tried inserting the following code into my functions.php:
add_filter('eventorganiser_venue_tooltip','my_custom_callback',10,2); function my_custom_callback( $tooltip_content, $venue_id ){ //Callback performs operation return $tooltip_content; }
However, no changes seem to occur to the tooltip?
Thanks for your help,
Kyle
$tooltip_content
is the (HTML) content of the venue tooltip, you need to change it to include what you want.See for instance, the second example on this page: http://wp-event-organiser.com/documentation/hook/eventorganiser_venue_tooltip/.
Ok, I have now included the complete example.
Though, some part of that code being added to my functions.php results in the whole site becoming inaccessible? Not sure if you’ve any idea what this may be?
My apologies, the function was named incorrectly. Try:
/** * Adds a link to the venue page to the tooltip * * Uses the eventorganiser_venue_tooltip filter to append content to the venue tooltip. * The filter passes 2 objects: the content of the toolip, the venue (term) ID */ add_filter('eventorganiser_venue_tooltip','my_venue_tooltip_content_link_to_venue',10,2); function my_venue_tooltip_content_link_to_venue( $description, $venue_id ){ $description .= sprintf('<p><a href="%s"> Visit the venue page! </a> </p>', eo_get_venue_link($venue_id)); return $description; }
Brilliant! Problem solved, link added.
I’ll speak to my client and look into purchasing the pro version for the advance venue querying.
Many thanks,
Kyle
Awesome :). No worries.
- The topic ‘Listing venues by province?’ is closed to new replies.