I have a custom looper below. I am testing to make sure I do this right so i am aware you can build a query for products another way. This is just the base to refine the query.
I added a slider elemnt. made the slide a looper with custom: crosssell . and Consumer to all.
It shows nothing. Did i set this up right? How do i make the slider show all products by using a custom looper function only? (I will be adding other args to the looper after i get it to show all products first. )
add_filter(‘cs_looper_custom_crosssell’, function($result, $args) {
$args = array(
‘post_type’ => ‘product’,
‘posts_per_page’ => -1
);
$products = new WP_Query( $args );
return $products;
}, 10, 2);