Support » Plugin: Events Manager » Create Search Field for Custom Field or Attribute

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thanks for tip. If I only wanted to be able to search for tags (text box search not drop down) what would I have to modify to be able to add this to the search form.

    add_action('em_template_events_search_form_ddm', 'my_em_styles_search_form');
    function my_em_styles_search_form(){
    	$my_em_styles = (is_array(get_option('my_em_styles'))) ? get_option('my_em_styles'):array();
    	?>
    	<!-- START Styles Search -->
    	<select name="style">
    		<option value=''>All Styles</option>
    		<?php foreach($my_em_styles as $style_id=>$style_name): ?>
    		 <option value="<?php echo $style_id; ?>" <?php echo ($_POST['style'] == $style_id) ? 'selected="selected"':''; ?>><?php echo $style_name; ?></option>
    		<?php endforeach; ?>
    	</select>
    	<!-- END Styles Search -->
    	<?php
    }

    Nevermind. Just realized the tag search is built-in. In the first field. Thought it was a label. Excuse my ignorance.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    do you mean in the general search field? If so, I don’t think that tags are searched (if so, pleasant coincidence!)…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Create Search Field for Custom Field or Attribute’ is closed to new replies.