Additional Search Fields
-
I’m creating a product search functionality for a website I’m working on. The generated HTML code look something like the following:
<form action="<?=bloginfo('siteurl')?>" id="searchform" method="get"> <input type="text" name="s" placeholder="Search for..." /> <select style="background:#fff; width:180px; border:none; padding:10px;" name="s"> <option name="cookers">Cookers</option> <option name="refrigerators">Refrigerators</option> <option name="clerical">Clerical</option> <option name="drinks-facilities">Drinks Facilities</option> </select> <input type="submit" value="Search" id="searchsubmit" /> </form>The URL at present is ‘http://siteurl.com/search/searchterm’ and I’m unable to pass the selected category to the url to then display only products within the selected category.
Any suggestions? Or anyone know of any plugins worth a look?
Disclaimer: Don’t judge me on the inline styling 😉 that will go on the live site.
The topic ‘Additional Search Fields’ is closed to new replies.