custom search & taxonomy
-
Hi there!
I am trying to build a custom search using taxonomies but am strugglig to do so, despite extensive research.
What I would like is, by selecting different images refering to taxonomies (in input fields), get the related posts.
Here some input fields used, for taxonomy “prix”. Both can be checked.
<input type='hidden' value='1' name='s' /> <input type='checkbox' id='prix-04' value='prix-04' name='prix' class='radio-diff' /> <label style='background:url("http://infinityandbeyond.fr/wp-content/themes/gravit_modif/images/orange/prix-big.png")' for='prix-04' class='label-diff'></label> <input type='checkbox' value='prix-04' name='prix' /> <input type='checkbox' id='prix-05' value='prix-05' name='prix' class='radio-diff' /> <label style='background:url("http://infinityandbeyond.fr/wp-content/themes/gravit_modif/images/orange/prix-big.png")' for='prix-05' class='label-diff'></label> <input type='checkbox' value='prix-05' name='prix' />Once submitted, here is the kind of URL I get :
http://infinityandbeyond.fr/?s=1&type-activite=aerien&type-activite=photographie&prix=prix-04&prix=prix-05Problem is it looks like it only selects the last parameter of each taxonomy, ie “type-activite=photographie” and “prix=prix-05” while it should look for type-activite in (aerien,photographie) and prix in (prix-04,prix-05).
As the search query, i’m using that code :
<?php $posts = query_posts($query_string.’&posts_per_page=-1′);?>Can you help me with this?
Thank you very much,
Regards,
Jonathan
The topic ‘custom search & taxonomy’ is closed to new replies.