I’m trying to add a sidebar to my home page which is the woocommerce Shop page. After trying all of the methods below, then going to Customize/Widgets the Sidebar does not display.
Please advise, thank you!
I have tried the following:
Setting the Sidebar Layout to: Content/Sidebar;
Adding the text below by using:
Code Snippets;
Adding directly to Parent via Customize/Aditional CSS;
Adding to Child Theme/GeneratePress Child: Stylesheet (style.css)
add_filter( ‘generate_sidebar_layout’,’tu_custom_woocommerce_sidebar_layout’ );
function tu_custom_woocommerce_sidebar_layout( $layout )
{
// If we are on a woocommerce page, set the sidebar
if ( function_exists( ‘is_woocommerce’ ) && is_woocommerce() )
return ‘both-left’;
// Or else, set the regular layout
return $layout;