Search in custom meta field – two input text field
-
Hi,
I needed to add another keyword search field to the form to search within custom meta field -> ‘my_city_meta_field‘. I managed to add this field by including these 2 lines of code to searchform.php:
echo '<center><label class="awqsf-label-keyword">City</center></label>' echo '<input id="my_city_meta_field" type="text" name="my_city_meta_field" value="" />';
All is working great. I can search within posts that have specific ‘City’ name but… I have other filters like taxonomy checkboxes etc. The problem is when I type i.e. New York in this field and check other filters. Then wp returns only those posts with the city specified and just skips other filters. It looks like my custom search field and standard awpqf filters aren’t combined as a single search query. What else do I have to edit to get the results that meets all the search criteria?
Sorry for my bad english ??
https://www.ads-software.com/extend/plugins/advance-wp-query-search-filter/
- The topic ‘Search in custom meta field – two input text field’ is closed to new replies.