Archived topic
Merch single product template sidebars not displaying like the preview
5 replies · Started by Clint on January 12, 2021
Hi I have installed the Merch site. I use Beaver builder so havent installed the gutenberg content or wooblocks and the single product pages are not showing the rather nice rH sidebar effect where it sits below the middle of the page opposite the description and reviews etc. I cant see anything too obvious as to why this would be but when i activate the sidebar it fills the whole length of the page. For the moment i have added some css to stretch the description across the width pf the page otherwise it looks a bit odd. I guess im either missing some css or i need to get rid of beaver builder but i use it quite extensively so am a bit loathed to go down that route unless i really have to. but would appreciate some help.
Chers clint
site is https://www.rocketboygifts.com
Hi there,
the Merch site does not use the Woocommerce Sidebar Layout in Customizer > Layout > Woocommerce -> Single Product. They are disabled. The Sidebar is then hooked into place using a Hook Element.
This blog topic explains how that was originally set up:
Thanks for your reply so would it have been better to have imported the content too. I just tried to add the hook but it ddnt work (at all) Im not too sure what i should be adding
So these are the steps:
1. In Customizer > Layout > Woocommerce --> Single >> Sidebar set this to No Sidebar.
2. Create a new Hook Element titled Woo Single Product Sidebar.
2.1 Add this to the Hook Content:
<?php get_sidebar( 'right-sidebar'); ?>
2.2 Set the Hook to: woocommerce_after_single_product_summary
2.3 Set the Display Rules to Product > All Products
3. Then add this CSS to your site:
@media (min-width: 768px) {
.single-product #right-sidebar {
float: right;
}
.single-product div.product .woocommerce-tabs,
.single-product div.product .related.products,
.single-product div.product .upsells.products {
width: 66%;
display: inline-block;
}
}
As long as there is nothing else interfering with the woo single template then that should put it where the Merch demo has it.
Fantastic Thank you (i was missing the php bit) it's a really nice theme!
Cheers
Clint
Awesome - glad to be of help - and glad you're liking the theme!