Bonjour,
Je cherche à faire un formulaire multi-recherche pour mon site.
Mais j'ai un peu du mal, cela ne fonctionne pas. Car j'ai plusieurs fois la même variable. Pour info, c'est sur wordpress.
Voici mon code, merci pour votre aide.
Je cherche à faire un formulaire multi-recherche pour mon site.
Mais j'ai un peu du mal, cela ne fonctionne pas. Car j'ai plusieurs fois la même variable. Pour info, c'est sur wordpress.
Voici mon code, merci pour votre aide.
<form action="<?php bloginfo('url'); ?>" method="get" id="searchform" class="form_search">
<div class="searchfield">
<input name="s" type="text" id="s" tabindex="1" class="editbox_search" style="width:320px" <?php if ( get_search_query() ) { echo 'value="'.trim(strip_tags(esc_attr(get_search_query()))).'"'; } else { ?> value="<?php _e('What are you looking for?','appthemes'); ?>" onfocus="if (this.value == '<?php _e('What are you looking for?','appthemes'); ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('What are you looking for?','appthemes'); ?>';}" <?php } ?> />
</div>
<div class="searchbutcat">
<?php wp_dropdown_categories('show_option_all='.__('Type d\'hébergement', 'appthemes').'&hierarchical='.get_option('cp_cat_hierarchy').'&hide_empty='.get_option('cp_cat_hide_empty').'&depth='.get_option('cp_search_depth').'&show_count='.get_option('cp_cat_child_count').'&orderby='.get_option('cp_cat_orderby').'&title_li=&use_desc_for_title=1&tab_index=2&name=scat&selected='.cp_get_search_catid().'&class=searchbar&taxonomy='.APP_TAX_CAT); ?>
<?php wp_dropdown_categories('show_option_all='.__('Pays - Régions', 'appthemes').'&hierarchical='.get_option('cp_cat_hierarchy').'&hide_empty='.get_option('cp_cat_hide_empty').'&depth='.get_option('cp_search_depth').'&show_count='.get_option('cp_cat_child_count').'&orderby='.get_option('cp_cat_orderby').'&title_li=&use_desc_for_title=1&tab_index=2&name=scat&selected='.cp_get_search_catid().'&class=searchbar&taxonomy='.APP_TAX_REG); ?>
<?php wp_dropdown_categories('show_option_all='.__('Idée de séjour', 'appthemes').'&hierarchical='.get_option('cp_cat_hierarchy').'&hide_empty='.get_option('cp_cat_hide_empty').'&depth='.get_option('cp_search_depth').'&show_count='.get_option('cp_cat_child_count').'&orderby='.get_option('cp_cat_orderby').'&title_li=&use_desc_for_title=1&tab_index=2&name=scat&selected='.cp_get_search_catid().'&class=searchbar&taxonomy='.APP_TAX_IDS); ?>
<?php wp_dropdown_categories('show_option_all='.__('Expérience', 'appthemes').'&hierarchical='.get_option('cp_cat_hierarchy').'&hide_empty='.get_option('cp_cat_hide_empty').'&depth='.get_option('cp_search_depth').'&show_count='.get_option('cp_cat_child_count').'&orderby='.get_option('cp_cat_orderby').'&title_li=&use_desc_for_title=1&tab_index=2&name=scat&selected='.cp_get_search_catid().'&class=searchbar&taxonomy='.APP_TAX_EXP); ?>
</div>
<button class="submit" type="submit" tabindex="3" title="Rechercher" id="go" value="search" name="sa">Rechercher</button>
</form>