$sql="SELECT DISTINCT * FROM wp_posts INNER JOIN wp_term_relationships ON(wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_taxonomy ON(wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) INNER JOIN wp_terms ON(wp_term_taxonomy.term_id = wp_terms.term_id) WHERE (wp_terms.name LIKE '% {$search_keyword}%' OR wp_terms.name LIKE '{$search_keyword}%' OR wp_posts.post_title LIKE '% {$search_keyword}%' OR wp_posts.post_title LIKE '{$search_keyword}%') AND wp_posts.post_status='publish'";
$search_products = $wpdb->get_results($sql, OBJECT);