-1

I'm trying to get it work with tag__not_in but it doesn't work.

$args = array('order' => 'DESC', 'orderby' => 'count', 'number' => '70',  'taxonomy' => 'post_tag', 'tag__not_in'=>array('28,24'),'hide_empty' => FALSE, 'title_li'=> __( '' ), 'show_count'=> 1, 'echo' => 0 );  

any idea how I could work this out?

  • 1
    Your array is incorrect. Try 'tag__not_in'=>array(28, 24). And check the PHP docs for creating arrays – s_ha_dum Dec 17 '15 at 1:39
  • twas still the same :( – tryingtocode Dec 17 '15 at 6:07
0
$query = new WP_Query( array( 'tag__not_in' => array( 37, 47 ) ) );

tag_not_in id is not string, so you don't need to quote the numbers. For Deep in Query check in here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.