Here's the code for my search form:
<form role="form">
<div class="form-group">
<select class="form-control custform">
<option>Make (Any)</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
<div class="form-group">
<select class="form-control custform">
<option>Model (Any)</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
<div class="form-group">
<select class="form-control custform">
<option>Min Price</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
<div class="form-group">
<select class="form-control custform">
<option>Max Price</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input id="cars" type="checkbox"> Cars
</label>
</div>
</div>
<button type="submit" class="btn btn-primary btn-block btnsearch">
Find Vehicles <span class="glyphicon glyphicon-search"> </span> </button>
</form>
And here's how it should look:
I added a few categories that aren't in the code to show how it should end up.
Basically I'm clueless as to how to implement this in my Wordpress theme that I've coded from scratch. Make and Model are both custom fields and Min Price and Max Price obviously need to use some sort of range function to return results within the price range.
The make and model dropdown menu's need to show only available options that have been entered in the custom field - if that makes sense.
Any help is massively appreciated.
You want use metabox for posttype like car,ven and 4x4's and price this four metabox add in your posttype so ,easy search post
go to this link to know how to create metabox
http://code.tutsplus.com/tutorials/how-to-create-custom-wordpress-writemeta-boxes--wp-20336
and then you search by meta name like car,ven etc code is here
You create your custom search form. Form action must be your specific search page(new template).
In your new template, you can use this bellow query:
And compare param details: