SHARE
TWEET

Adding events tag to search form

eventsmanager Feb 25th, 2016 330 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  Adding events tag to search form
  3.  - create php file and folders under wp-contents/themes/your
  4.    -> wp-content/themes/Your Theme/plugins/events-manager/templates/search/categories.php
  5.  - copy the contents from wp-contents/plugins/events-manager/templates/templates/search/categories.php
  6.  - add the snippet below at the bottom of the file or below the events categories section
  7.  */
  8.  
  9. <label>Event tags </label>
  10. <?php
  11.     $selected = !empty($_REQUEST['search-tag']) ? $_REQUEST['search-tag'] : 0;
  12.     wp_dropdown_categories(array( 'hide_empty' => 0, 'name' => 'tag', 'hierarchical' => true, 'taxonomy' => EM_TAXONOMY_TAG, 'selected' => $selected, 'show_option_none' => 'Event Tags', 'class'=>'em-events-search-tag', 'orderby' =>'name'));              
  13. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top