Home › Forums › Other › WordPress Exclude Category (not working?) › Re: WordPress Exclude Category (not working?)
January 9, 2013 at 12:38 pm
#120406
Keymaster
In the code you’ve posed here, you haven’t included any category removal. It needs to be in the arguments you pass WP_Query.
$args = array(
‘orderby’ => ‘rand’,
‘post_type’ => ‘product’,
‘posts_per_page’ => $settings,
‘cat’ => ‘-234’
);