I have a carousel plugin which does various things and it only shows published products:
$common_args = array(
'post_type' => 'product',
'posts_per_page' => !empty($posts_per_page) ? intval($posts_per_page) : 4,
'post_status' => 'publish',
'ignore_sticky_posts' => true,
'no_found_rows' => true,
);
But I need it to exclude 'hidden' products, which technically are still published just not visible. Alternatively I could use it if it excluded products that were in specific categories (all my hidden products are in two specific categories).
How can I do either of these please?