Home › Forums › Other › WordPress Exclude Category (not working?) › Re: WordPress Exclude Category (not working?)
January 9, 2013 at 12:43 pm
#120410
Member
That’s because what I posted was the original code. I’ve tried adding in the exclusion for the category, but the result is the same. It’s like wordpress is ignoring the argument for excluding the category. I updated my code and if you look at the site now, you’ll still find items in the “more products” section that are plain. (Refresh a few times and you’ll eventually find the word “plain” in at least one of the products)
This is my code for that part now:
$args = array( ‘orderby’ => ‘rand’, ‘post_type’ => ‘product’, ‘posts_per_page’ => $settings, ‘cat’ => ‘-234’ );