Hello – I am storing an array of product id’s for “Product Accessories” that I’d like to display as a slider on the single product page. I’m testing a snippet using the standard WooCommerce shortcode for displaying products (https://docs.woocommerce.com/document/woocommerce-shortcodes/).
This is displaying a grid, but it won’t render the attributes for product count, columns, etc so it’s just displaying as a giant 2 column grid.
How can I display a 4 column product slider just like the “Related Products” slider included with the theme?
By the way, I’m using Elementor – is there a shortcode for Elementor or the Woodmart theme that I can use or is this accomplished with a different method?
add_action( 'woocommerce_after_single_product_summary', 'output_product_accessories', 5 );
function output_product_accessories() {
echo "TEST";
echo do_shortcode('[products limit="4" columns="4" paginate="false" orderby="popularity" class="quick-sale" on_sale="true" ]');
}
Thanks!