I need to modify the value and name of the products filter in a WordPress template that I’ve purchased.
The template is Automotive – Templatic. I need to change values and name of filter products filter. I’m trying to change this PHP code:
<form id="search_car" name="search_car" action="<?php echo home_url(); ?>" method="get">
<input type="hidden" name="search" id="search" value="vehicle" />
<div class="selectbox select1">
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s" placeholder="<?php _e('Model , Name etc...',T_DOMAIN); ?>">
</div>
<span class="shape2"><?php _e('OR',T_DOMAIN); ?></span>
<?php if($post_category): ?>
<div class="selectbox select2">
<select class="select" title="<?php _e("All Makes",T_DOMAIN); ?>" name="makes" id="makes">
<option value=""><?php _e("All Makes",T_DOMAIN); ?></option>
<?php
$args = array( 'taxonomy' => 'vcategory' );
$terms = get_terms( 'vcategory',$args);
foreach ( $terms as $term ):
?>
<option value="<?php echo $term->term_id; ?>" <?php if($_REQUEST['makes'] == $term->term_id){ ?> selected="selected" <?php } ?>><?php echo esc_attr( $term->name ); ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
<?php if($model_status): ?>
<div class="selectbox select2">
<select class="select" title="<?php _e('All Models',T_DOMAIN); ?>" name="status" id="model_status">
<option value=""><?php _e('All Models',T_DOMAIN); ?></option>
<?php
$explode = explode(",",$option);
foreach($explode as $_explode):
?>
<option value="<?php echo $_explode; ?>" <?php if($_REQUEST['status'] == $_explode){ ?> selected="selected" <?php } ?>><?php echo sprintf(__('%s',T_DOMAIN),$_explode); ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
<?php if($fuel): ?>
<div class="selectbox select2">
<select class="select" title="<?php _e('All Type',T_DOMAIN); ?>" name="fuel" id="fuel">
<option value=""><?php _e('All Type',T_DOMAIN); ?></option>
<?php
$fuel_exp = explode(",",$fuel_option);
foreach($fuel_exp as $_fuel_option):
?>
<option value="<?php echo $_fuel_option; ?>" <?php if($_REQUEST['fuel'] == $_fuel_option){ ?> selected="selected" <?php } ?>><?php echo sprintf(__('%s',T_DOMAIN),$_fuel_option); ?></option>
<?php endforeach; ?>
</select>
</div>
<?php endif; ?>
I have to create 3 dropdown fields and 1 text area field. Can you help me?
Thanks in advance…