You have written key
as meta_value
. It should be your meta name. The name you have given to your custom fields or meta. Then use the following query.
$args = array (
'post_type' => 'your-post-type',
'posts_per_page' => -1,
'meta_query' => array(
array(
'key' => 'demo',
'value' => '',
'compare' => '!='
),
),
);
By default the compare
is set to =