This does add search terms to query as shown below:
AND ( (wp_postmeta.meta_key = 'key1' AND CAST(wp_postmeta.meta_value AS CHAR) LIKE '%string%') OR (mt1.meta_key = 'key2' AND CAST(mt1.meta_value AS CHAR) LIKE '%universe%') )
But this still isn’t doing what I want it to do. If the search string isn’t in the post_title, I don’t get any search results. So, what I need to do is somehow eliminate the post_title from the search or change the first AND in the clause above to OR. Any ideas on how to do this?
The topic ‘Exclude post_title and post_content from search query’ is closed to new replies.