WordPress.org

Support

Support » How-To and Troubleshooting » exclude multiple category id , how to code it

exclude multiple category id , how to code it

  • dear,

    i want to exclude both category id = 40 and id =162 posts, but below code doesn’t work, it only excludes category id=40 posts, anyone can modify the code for me? thanks alots.

    $args = array( ‘numberposts’ => 3, ‘category’ => -40,-162 );

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘exclude multiple category id , how to code it’ is closed to new replies.