I am using the Event Organiser plug in and I am trying to setup the “venues.”
In the post my client and I would like a little more information on the venue to appear,
I found the short code for the Google Map, but there is no other information.
When I click on the location nothing happens.
Is there a short code to post more information on the Venue?
There aren’t currently any shortcodes for venue information (address, postcode, other meta etc). However, you can copy the
single-event.php
template (find it in thetemplates
directory of the plug-in) into your theme and edit it there to include venue information via provided template functions:Available functions
When used inside the loop, you don’t need to provide any parameters – it uses the veneu of the current event.
eo_get_venue_address()
– returns an array of the formeo_get_venue()
– returns the venue ID of the current eventeo_get_venue_description()
– returns the description of the venue (eo_venue_description()
prints it)eo_get_venue_name()
– returns the name of the venueeo_get_venue_meta(eo_get_venue(),'key')
– Get meta for this venue with key ‘key’.This is an incomplete list (see source for more). Outside the loop you will need to provide a venue ID (int) or slug (string). Documentation can be found here.
Example
For instance, you could have the following to immediately after
<?php the_content();?>
in the template file, to print some venue details:You will probably need to add some styling to make it look nice, or just use the appropriate classes for your theme.
Note
I plan on adding some more shortcodes, but if you, or anyone does so before me, feel free to contact me via the plug-in’s forums – you’ll get plenty of credit :).
I’ve not tested the above – so there may be syntax errors. If you have any problems implementing it, it might be best to contact me via the forums.