custom search form for custom post

I am creating a car dealership theme. I have a custom post with the name Car_posts. This custom post has the following fields. Make , Model, Year, Mileage, Condition, Minimum Price, Maximum Price etc. What I want is to create a custom search form by using the these fields: Make , Model, Min-Price, Max-Price and display the result in a page called search-results.php.This is my form:

          <form role="search" action="<?php echo site_url( '/' ); ?>" method="get" id="searchform">
            <input type="text" name="make" placeholder="Make"/>
            <input type="text" name="model" placeholder="Model"/>
            <input type="text" name="min_price" placeholder="Min Price"/>
            <input type="text" name="max_price" placeholder="max Price"/>

            <input type="submit" alt="Search" value="Search" />

Please can someone help me the wordpress code for creating a working custom search form based on the above mentioned customd fields

Read more here: custom search form for custom post

Leave a Reply

Your email address will not be published. Required fields are marked *