Filtered Search of custom fields via Modded plugin
Cant believe i spent a day and a half knee deep in codex when all i had to do was change half a dozen charachters in the
wp-custom-fields-search plugin.
This will now filter search via keywords and custom fields, due to what i had to do to it for styling it is no good as a sidebar widget (unless you want to re-style it for your sidebar)
I wanted to search by:
*keywords = textfield
*City = dropdown (populated by cp_city custom field)
*State = dropdown (populated by cp_state custom field)
for using just one of the 3 filters it will return everything, ie: using city will return all of those cities.
for using two (city and state) of the 3 filters it will filter posts and return all *city in *state
For using all three it will return a 100% match of Keyword >> City >> State
If you need the input textfield longer or smaller you can alter its width by going to line 343 in the plugins extra_search_fileds.php file and altering the inline styling px width
For this to work at its best your chosen custom fields (except keywords) must be required fields on the ad listing form
*Note: Please refer to post 6 for the corrected file.
Last edited by jomarkosabel; March 3rd, 2011 at 07:47 AM.