Additional Search Fields (1 post)

  1. Oliver Farrell
    Posted 4 years ago #

    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>
       <input type="submit" value="Search" id="searchsubmit" />

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 4 years ago by Oliver Farrell
  • This topic is not resolved
  • WordPress version: 3.3.2