[ad_1]
​
function the\_filter $where, $my\_query ) {
global $wpdb;
echo “searching only title”;
if ( $search\_term = $my\_query->get( ‘search\_post\_title’ )) {
$where .= ‘ AND ‘ . $wpdb->posts . ‘.post\_title LIKE \\’%’ ;
}
return $where;
}
​
would like to be able to force this function to search not only the post title for like terms but also the tags and the body and the slug. How do I amend the $where variable to search the tags and title and slug and body etc. Couldn’t find any code online of people using anything other than the title.
[ad_2]