Venue Custom Fields

Event Organiser Pro makes it incredibly easy to associate custom information and thumbnails to your venue. If you already familiar with WordPress’ ‘featured image’ and ‘custom fields’ functionality, then you’re set to go with venues to.

Venue Meta

Venue custom fields (or venue meta) allows you to store arbitrary extra information associated with a venue. It could be contact phone number, the names of staff at the venue, opening times or even the colour of the venue, if say, you wanted to colour your event calendar according to venue rather than category.

Data is stored in key/value pairs – with a key, for example, being ‘opening_time’ and the value, ‘9am-5pm’. Each key can have more than one corresponding value. So a key might be ‘staff’ and it may have the values ‘Fred’, ‘Wilma’, ‘Barney’ and ‘Betty’.

Using custom fields should be familiar to anyone who has used custom fields with posts.

venue-custom-fields

To retrieve venue meta in your themes you can use the eo_get_venue_meta() function.

 $opening_time = eo_get_venue_meta( $venue_id, 'opening_time', true );
  • The first argument is the ID of the venue (you can get the venue ID from the event ID via eo_get_venue() – see docs).
  • The second argument is the key for which you want the corresponding values.
  • Finally the third argument can either be true or false. If set to true then the function will return a single result, as a string. If false, or not set, then the function returns an array of values corresponding to the key – even if there is only one value associated..

See this page for more information or view the documentation for the function.