Title: Pull-down for venues
Last modified: August 30, 2016

---

# Pull-down for venues

 *  Resolved [davecowen](https://wordpress.org/support/users/davecowen/)
 * (@davecowen)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/pull-down-for-venues/)
 * We only have two venues, and lots and lots of events at each venue, so it’s a
   bit of a drag typing in their name each time. Would it be possible to be able
   to keep a list of venues in the main plugin, then have a drop-down menu of venues
   for the events?
 * [https://wordpress.org/plugins/theatre/](https://wordpress.org/plugins/theatre/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Jeroen Schmit](https://wordpress.org/support/users/slimndap/)
 * (@slimndap)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/pull-down-for-venues/#post-6667553)
 * This is possible with a little bit of PHP code.
    The filter to use is `wpt/event_editor/
   fields`, which can be used to replace the default text input for the venue field
   with something else (eg. a dropdown with just two options).
 *  [newelement76](https://wordpress.org/support/users/newelement76/)
 * (@newelement76)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/pull-down-for-venues/#post-6667783)
 * Jeroen, Could you help out a little bit with the filter. I know I need to at 
   least do this, but not sure what to do from there.
 * `function wpt_venue_dropdown($fields, $event_id){
 *  return $fields;
 * }
 * add_filter(‘wpt/event_editor/fields’,’wpt_venue_dropdown’,10,3);
 *  [newelement76](https://wordpress.org/support/users/newelement76/)
 * (@newelement76)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/pull-down-for-venues/#post-6667784)
 * I found that the keys changed depending on the action taking place. Is there 
   a better way for me to check this?
 * `function wpt_venue_dropdown($fields, $event_id){
 *  if( $fields[0][‘id’] === ‘wp_theatre_prod’ ){
    $fields[3][‘edit’] = array(“callback”
   => ‘editVenues’ ); $fields[3][‘save’] = array(“callback” => ‘saveVenues’ ); }
   else { $fields[2][‘edit’] = array(“callback” => ‘editVenues’ ); $fields[2][‘save’]
   = array(“callback” => ‘saveVenues’ ); }
 *  return $fields;
 * }
 * add_filter(‘wpt/event_editor/fields’,’wpt_venue_dropdown’,10,3);’
 *  Plugin Author [Jeroen Schmit](https://wordpress.org/support/users/slimndap/)
 * (@slimndap)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/pull-down-for-venues/#post-6667786)
 * The correct code is here:
    [https://gist.github.com/slimndap/ea7b9a6d07b2f992831b](https://gist.github.com/slimndap/ea7b9a6d07b2f992831b)

Viewing 4 replies - 1 through 4 (of 4 total)

 The topic ‘Pull-down for venues’ is closed to new replies.

 * ![](https://ps.w.org/theatre/assets/icon-256x256.png?rev=1208182)
 * [Theater for WordPress](https://wordpress.org/plugins/theatre/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/theatre/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/theatre/)
 * [Active Topics](https://wordpress.org/support/plugin/theatre/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/theatre/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/theatre/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Jeroen Schmit](https://wordpress.org/support/users/slimndap/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/pull-down-for-venues/#post-6667786)
 * Status: resolved