I need to search post and custom post type which are both in the same category, but I need to filter only post type by a meta with a custom field. Using meta_query I tried
$meta_query = array(array( 'key' => 'public', 'value' => '1', 'type' => 'NUMERIC', 'compare' => '=' ) );
but simple post doesn't have this meta so they are excluded. How can I refer this meta query only to custom post type and not to post?