Search: Restrict by custom field value?
-
Hi everybody,
I created my own search form with some checkboxes which let the user restrict the search to post with certain categories, tags etc.
I do this by adding arguments to the search string; it looks for example like this:(url)?s=xy&cat=178&post_type=post
I’d like to do that also with certain custom fields my post have; how can I do that?
1. is there something I can add to the string, so that the search is automatically restricted to a custom field value (like “&cf:year=2014”)?
2. If not, how do I have to change “search.php” to read out the respective value of the search string and display only posts with this custom field value?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Search: Restrict by custom field value?’ is closed to new replies.