WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm in the very hard journey to make a Tire Website.

You know , Lots of Cars, Tires , Brands, An absolutely headache.

I'm using jigoshop as my main e-commerce plugin. and because is to difficult to filter attributes in jigoshop. I will use the simple search of wordpress for filtering words .

but if I use a select box like:

<form role='search' method='post' id='searchform' action='/'>
                                <option id="s" value="255">225</option>
                                <option id="s" value="230">230</option>
                                <option id="s" value="">235</option>
                                <option id="s" value="">240</option>
                                <option id="s" value="">245</option>
                                <option id="s" value="">250</option>
                                <option id="s" value="">260</option>
                                <option id="s" value="">265</option>
                                <option id="s" value="">270</option>

                                <option id="s" value="40">40</option>
                                <option id="s" value="45">45</option>
                                <option id="s" value="">50</option>
                                <option id="s" value="">55</option>
                                <option id="s" value="">60</option>
                                <option id="s" value="">65</option>
                                <option id="s" value="">70</option>
                                <option id="s" value="">75</option>
                                <option id="s" value="">80</option>
                                <option id="s" value="">85</option>
                                <option id="s" value="">90</option>
                                <option id="s" value="">95</option>
                                <option id="s" value="">100</option>


                                <option id="s" value="10">10</option>
                                <option id="s" value="11">11</option>
                                <option id="s" value="">12</option>
                                <option id="s" value="">13</option>
                                <option id="s" value="">14</option>
                                <option id="s" value="">15</option>
                                <option id="s" value="">16</option>
                                <option id="s" value="">17</option>
                                <option id="s" value="">18</option>
                                <option id="s" value="">19</option>
                                <option id="s" value="">20</option>
                                <option id="s" value="">21</option>
                                <option id="s" value="">22</option>
                                <option id="s" value="">23</option>
                                <option id="s" value="">24</option>
                                <option id="s" value="">25</option>
                                <option id="s" value="">26</option>
                                <option id="s" value="">27</option>
                                <option id="s" value="">28</option>
                                <option id="s" value="">29</option>
                                <option id="s" value="">30</option>
                                <option id="s" value="">31</option>
                                <option id="s" value="">32</option>
                                <option id="s" value="">33</option>
                                <option id="s" value="">34</option>
                                <option id="s" value="">35</option>
                                <option id="s" value="">36</option>
                                <option id="s" value="">37</option>
                                <option id="s" value="">38</option>
                                <option id="s" value="">39</option>
                                <option id="s" value="">40</option>

                            <input class='btn' value='Search' type='submit'/>

I don't get any result..

what is what am I doing wrong?


share|improve this question

Welcome to WPSE!

First of all - you cannot have two (or more) elements with the same ID. Second - your select elements lack name attribute and browser doesn't actually submit anything. Third - you cannot just expect to throw a bunch of selects into the form and expect everything to magically work. In order to even start searching, WordPress needs a query with s key - only then it will recognise the request as search and redirect to the appropriate search template.

As I said before, building a complex search system is not an easy task. You will probably need to hook into a pre_get_posts action, detect if certain values have been submitted and modify the query accordingly. Here's an article on how to build advanced queries using WP_Query class to get you started.

share|improve this answer
thanks for the answer , I think this will be a epic headach :D. I found: fearlessflyer.com/2012/10/… That is a good start point.... hope so. – Locke Jan 11 '13 at 18:58
this was the solution : stackoverflow.com/questions/14484675/… – Locke Jan 28 '13 at 19:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.