but have the id part be a dynamic variable that is passed via a select input element on the same page, then I can load up events based on the location (venue) of their choosing.
Either that, or is this something that you think we should be modifying in the event_list_display.php file.
There is nothing in built, you would need to run a custom function (I used the Custom Files Addon to do this) to grab the data from the database.
Something like
function get_all_venue_ids() {
global $wpdb;
$table_name = $wpdb->prefix . "events_venue";
$thevenues = $wpdb->get_col("SELECT id FROM $table_name");
return $thevenues;
}
and then call it in the appropriate template like so
<?php $venue_id_array = get_all_venue_ids(); ?>
Now you have the venue ID’s in an array to do with as you need.
The support post ‘Get List of Venues and their ID's’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.