0

It appears that the default WordPress search returns posts that contain the search term(s) within the post's meta values. I would like to inject new search results -- ones that aren't tied to a specific post, into the search results array when certain terms are searched for. For example: the user could search for "term1", and the results array would look like this:

Post 1: "this post contains the string term1" Post 2: "this one also contains term1" Custom Result: "this result is intended to display when the user searches for certain terms"

Is there some hook that is available to do this? Or would I need to make a function that manually makes a WP Search Query and appends/prepends the custom result after checking the search term against an array of matches?

Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.