- This topic has 4 replies, 2 voices, and was last updated 3 years, 8 months ago by
David.
-
AuthorPosts
-
August 23, 2018 at 5:29 am #657733
Daan van
Hi Leo and Tom,
I would like the WC shop page sidebar on the left and the single product pages with no sidebar.
I’ve succeeded in getting the left sidebar on the shop page with a snippet on a different thread on this page:
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 ‘left-sidebar’;
// Or else, set the regular layout
return $layout;
But I haven’t found out yet how to get the single product pages to show no sidebar.
On my other site, http://www.cribster.nl, the page specific layout options do work for single product pages and the shop page, which is kinda strange.
For example product page:
https://www.wiegenco.nl/winkel/merken/snuz/snuzpod3/
For shop page:
https://www.wiegenco.nl/winkel/
I’ve put the website on visible for the time being so you can take a look, it is still a work in progress.
How can I fix this and how can it be that those options do work for my previous site, but not for the latest one?
Thank you for your help again!GeneratePress 2.1.4GP Premium 1.7.2August 23, 2018 at 5:59 am #657764Daan van
One additional thing:
I used to be able to make the sidebar and header responsive by adding:
@media (min-width: 769px) {.inside-header {display: none;}
}
@media (max-width: 769px) {.sidebar .widget {display: none;}
}But on the new site, the .inside-header will not only delete the header, but also the primary navigation. It seems like the header and navigation are now integrated into one. What am I doing different/wrong?
August 23, 2018 at 7:15 am #657833David
StaffCustomer SupportHi there,
you may want to use the new Elements module, which has Display rules for Layout (headers and hooks):
https://docs.generatepress.com/article/layout-element-overview/
The Nav is set to Float Right so ends up inside the header hence it being removed. Have you thought of using the Mobile Header instead?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 27, 2018 at 11:21 am #661401Daan van
Thanks David! And I think I found the culprit, thanks for all the help!
August 27, 2018 at 12:34 pm #661483David
StaffCustomer SupportYou’re welcome 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.