Description
Retrieve post meta field for a venue.
This function returns the values of the venue meta with the specified key from the specified venue. (Specified by the venue ID – the taxonomy term ID).
Usage
<?php eo_get_venue_meta( $venue_id, $key, $single ); ?>
Parameters
- venue_id (int) – Venue (term) ID (required)
- key (string) – Optional. The meta key to retrieve. By default, returns data for all keys (required)
- single (boolean) – Whether to return a single value (optional|true)
Return Values
- (mixed) – Will be an array if $single is false. Will be value of meta data field if $single is true.
Change Log
Since: 1.5
Resources
Location
This function can be found in event-organiser/includes/event-organiser-venue-functions.php (line: 663)
Examples
<?php $key_1_values = eo_get_venue_meta(76, 'key_1'); ?>
To retrieve only the first value of a given key:
<?php $key_1_value = eo_get_venue_meta(76, 'key_1', true); ?>