eventsmanager

Exclude categories on search form Events category ddm

Jun 15th, 2017
205
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php $args = !empty($args) ? $args:array(); /* @var $args array */ ?>
  2.  
  3. <!-- START Category Search -->
  4.  
  5. <div class="em-search-category em-search-field">
  6.  
  7. <label>
  8.  
  9. <span><?php echo esc_html($args['category_label']); ?></span>
  10.  
  11. <?php
  12.  
  13. EM_Object::ms_global_switch(); //in case in global tables mode of MultiSite, grabs main site categories, if not using MS Global, nothing happens
  14.  
  15. wp_dropdown_categories(array(
  16.  
  17. 'hide_empty' => 0,
  18.  
  19. 'orderby' =>'name',
  20.  
  21. 'name' => 'category',
  22.  
  23. 'hierarchical' => true,
  24.  
  25. 'taxonomy' => EM_TAXONOMY_CATEGORY,
  26.  
  27. 'exclude' => '191,195,196,197,198,247',
  28.  
  29. 'selected' => $args['category'],
  30.  
  31. 'show_option_none' => $args['categories_label'],
  32.  
  33. 'option_none_value'=> 0,
  34.  
  35. 'class'=>'em-events-search-category'
  36.  
  37. ));
  38.  
  39. EM_Object::ms_global_switch_back(); //if switched above, switch back
  40.  
  41. ?>
  42.  
  43. </label>
  44.  
  45. </div>
  46.  
  47. <!-- END Category Search -->
RAW Paste Data