- This topic has 9 replies, 2 voices, and was last updated 9 years, 4 months ago by
Tom.
-
AuthorPosts
-
November 25, 2016 at 7:04 am #247599
Damiaan van Vliet
Hi, for some reason the sidebar layout on the home page is not working.
I have woocommerce installed. So it is on the shop page.
I edit the page, sidebar/content.
I have filled the sidebar with widgets.
Don’t know what to do else.
With default theme no problem.Strange…
November 25, 2016 at 11:21 am #247712Tom
Lead DeveloperLead DeveloperIf the page is an index (blog page, main WooCommerce page), the meta box settings won’t apply. This is a WP limitation.
Instead, while looking at the page you want to edit, click the “Customize” button in the admin bar. Then go to “Layout > Sidebars” to adjust the layout.
If you want a different sidebar layout for WooCommerce only, check out the first PHP snippet on this page: https://generatepress.com/knowledgebase/choosing-sidebar-layouts/#sidebar-filter
Let me know if you need more info 🙂
November 25, 2016 at 9:57 pm #247886Damiaan van Vliet
Hi Tom,
I tried customize, layout, sidebar but sidebar is not visible.
webshopThanks.
November 26, 2016 at 12:17 am #247898Tom
Lead DeveloperLead DeveloperWhich page are you trying to add the sidebar to? The home page?
When you view the home page and click “Customize” (so you’re looking at the home page in the Customizer), what’s the “Layout > Sidebars” value set to?
November 26, 2016 at 12:24 am #247901Damiaan van Vliet
content / sidebar
shall I send you login details and set site in English language?November 26, 2016 at 10:10 am #248011Tom
Lead DeveloperLead DeveloperSure, no need to set it to English – I know my way around 🙂
November 26, 2016 at 10:14 am #248017Damiaan van Vliet
Send you login details, Tom. Thanks a ton!
November 26, 2016 at 10:26 am #248024Tom
Lead DeveloperLead DeveloperYou have this added in your custom functions:
/* hide sidebar on woocommerce pages */ add_filter( 'generate_sidebar_layout','generate_custom_woocommerce_sidebar_layout' ); function generate_custom_woocommerce_sidebar_layout( $layout ) { // If we are on a woocommerce page, set the sidebar if ( is_woocommerce() ) return 'no-sidebar'; // Or else, set the regular layout return $layout; }That will override the setting in the Customizer.
November 27, 2016 at 3:29 am #248198Damiaan van Vliet
Great! That’s it! From a different shop I used some files.
Thank you.November 27, 2016 at 10:12 am #248338Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.