Advertisement
eventsmanager

Adding events tag to search form

Feb 25th, 2016
1,094
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  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. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement