I have a wordpress + woocommerce store. On the product page I want to display a carousel with similar products, but not in the bootstrap container of the theme, but to the full width of the page. Whatever position I set for the function of the standard hook
add_action('woocommerce_after_main_content', 'woocommerce_output_related_products'); anyway, similar items are displayed within the container. If I prescribe a shortcode in the footer, then as I understand it there is no link to a specific product and with this method there are few similar products (not even enough to fill the entire page width) ..
<?php if (is_product()); ?> <section class="related-products"> <?php echo do_shortcode ('[related_products per_page="4"]'); ?> </section> <?php endif; ?> Those. roughly speaking: if you pull a hook, then everything is output (say, 8 similar products), but in a container, and if a shortcode, then already full width, but only 2 - that’s the dilemma .. How to be?