Multi-Category Search Form
I am trying to code up a multi-category search form. I know there is a plugin for this, but it does not produce the output I am looking for. Basically, I want to be able to filter posts by one or more categories. So far, (I haven’t written the code yet) this is my idea, I just want to know if anyone thinks this will work.
A search form that will include drop down menus each listing categories. For example, the first dropdown menu would be vehicle make and the second would be body style.
So the input would be something like <input type=”select” name=”make”> for example, and upon submitting the form, would initiate the action where $variable1 = “make”; and $variable2 = “bodystyle”;
then a wp function like possibly get_posts(‘category’=>$variable1&$variable2);
I am not sure if you can use variables inside of a wp function like that or not. Any ideas on the best way to implement this would be most appreciated.
- The topic ‘Multi-Category Search Form’ is closed to new replies.