get posts by meta_key from inside key of post meta
get posts by meta_key from inside key of post meta
get posts by meta_key from inside key of post meta
meta_query not working as expected
Search form not working with custom query?
I hope this would do, i have not tested it. Test it on your own risk, but the query related to it very closely. function kv_get_custom_search_query($search_text){ global $wpdb; $wpdb->get_results( “SELECT * FROM $wpdb->posts WHERE post_title=”%$search_text%” OR post_content=”%$search_text%” OR post_title=”%$search_text%” LEFT JOIN $wpdb->users ON $wpdb->posts.post_author=$wpdb->users.ID AND display_name=”%$search_text%””); }
auto-populating custom nav with all items from custom post type
Prioritize posts in query by meta keys?
Exclude Category filter from Portfolio section
Random ajax load only works with posts_per_page set to -1
wp_reset_postdata() and wp_reset_query() inside shortcode are not working to reset original page query
Try setting an array for meta_query instead, I do not think using just a string for it is the intended usage, but this may work instead in your case: ‘meta_query’ => array( array( ‘key’ => ‘_thumbnail_id’, ‘compare’ => ‘EXISTS’ ) )