Wait a minute... This content is very very old. We no longer sell or support this theme version. New Topics
Version 9
Syed Gulzar Ali
0 points
Beginner
Hello guys,
I want to setup an advanced search under the header. How can i add a custom field/taxonomy to the advanced search? I have used the following code to add a taxonomy called “City” in the search. It displays the list of cities i added but when i chose a city it returns the ID of the city instead of the name. So the search is not working e.g it outputs
wordpress/?s=&cat1=&tx_city=78
78 is the ID of that option. The search works fine if ” tx_city=NameOfCity “. Is it possible for it to return the name of taxonomy option instead of its ID or is there any other way to do it?
Thanks
[code title=”Adding taxonomy field in search”]
<div class=”col-md-3″>
<select name=”tx_city” class=”form-control”>
<option value=”0″>
City
</option>
<?php echo $CORE->CategoryList(array(0,false,0,’city’)); ?>
</select>
</div>
[/code]
Hello guys,
I want to setup an advanced search under the header. How can i add a custom field/taxonomy to the advanced search? I have used the following code to add a taxonomy called “City” in the search. It displays the list of cities i added but when i chose a city it returns the ID of the city instead of the name. So the search is not working e.g it outputs
wordpress/?s=&cat1=&tx_city=78
78 is the ID of that option. The search works fine if ” tx_city=NameOfCity “. Is it possible for it to return the name of taxonomy option instead of its ID or is there any other way to do it?
Thanks
[code title=”Adding taxonomy field in search”]
<div class=”col-md-3″>
<select name=”tx_city” class=”form-control”>
<option value=”0″>
City
</option>
<?php echo $CORE->CategoryList(array(0,false,0,’city’)); ?>
</select>
</div>
[/code]
Members Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login NowMembers Only Content
This reply is for PremiumPress customers only.
Login Now