Answer the question
In order to leave comments, you need to log in
How to display a related block to the full width outside the container?
Hello! I have a store on wordpress + woocommerce. On the product page, I want to display a carousel with similar products, but not in the bootstrap theme container, but on the entire width of the page. Whatever position I set for the standard hook function
add_action('woocommerce_after_main_content', 'woocommerce_output_related_products');
<?php if (is_product()); ?>
<section class="related-products">
<?php echo do_shortcode ('[related_products per_page="4"]'); ?>
</section>
<?php endif; ?>
Answer the question
In order to leave comments, you need to log in
<?php if (is_product()); ?>
//Тут закрываете контейнер темы т.е все col-** , row, и container и прочие дивы которые надо закрыть
<div class="contayner-fluid">
<section class="related-products">
<?php echo do_shortcode ('[related_products per_page="4"]'); ?>
</section>
</div>
Тут заново открываете контейнер темы т.е все col-** , row, и container и прочие дивы которые надо открыть
<?php endif; ?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question