Site icon Hip-Hop Website Design and Development

meta_query ‘evaluate’ => ‘!=’ not working

I’m utilizing a customized post-type, in put up there are a checkbox meta subject for featured put up.

So there are two eventualities.

  1. First with featured posts
  2. Second with non featured

Once I referred to as featured posts with meta_query its end result 100% excellent.

Right here is my code:

$c_clients_args = array(
                    'post_type' => 'clients_testimonials',
                    'posts_per_page' => 6,
                    'order' => 'ASC',
                    'meta_query' => array(
                                        array(
                                            'key' => 'c_client_feature',
                                            'worth' => 'on'
                                        )
                                    )
                );

$c_clients_result = new WP_Query($c_clients_args);

if($c_clients_result->have_posts()) :
    whereas($c_clients_result->have_posts()) :
         $c_clients_result->the_post();

         // My end result
    endwhile;
endif;

However after I name non featured posts with meta_query the Web page goes clean.

Right here is my code:

$c_client_args = array(
                    'post_type' => 'clients_testimonials',
                    'posts_per_page' => 999,
                    'order' => 'ASC',
                    'meta_query' => array(
                                        array(
                                            'key' => 'c_client_feature',
                                            'worth' => 'on',
                                            'evaluate' => 'NOT LIKE'
                                        )
                                    )
                );

I additionally tried != and NOT IN

So please information me.