Site logo

Archived topic

Disable Right Bar for WooCommerce

5 replies · Started by adrian on April 17, 2020

Viewing posts 1–6 of 6

I am new and I've been reading lots of posts about this but I still don't understand. My shop page for woocommerce is showing the right side bar even after customizing it to show no content no sidebars. I went to theme files and clicked on sidebar.php How can I edit out the right side bar to not show the sidebar at all? I also want the main container to return to normal width. Thanks.

Here is the code:

<?php
/**
* The Sidebar containing the main widget areas.
*
* @package GeneratePress
*/

if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
?>

<?php generate_do_microdata( 'sidebar' ); ?>>

<?php
/**
* generate_before_right_sidebar_content hook.
*
* @since 0.1
*/
do_action( 'generate_before_right_sidebar_content' );

if ( ! dynamic_sidebar( 'sidebar-1' ) ) {
generate_do_default_sidebar_widgets( 'right-sidebar' );
}

/**
* generate_after_right_sidebar_content hook.
*
* @since 0.1
*/
do_action( 'generate_after_right_sidebar_content' );
?>

<!-- .inside-right-sidebar -->

<!-- #secondary -->

Hi there,

in Customizer > Layout > Woocommerce you can change the Sidebar Layout.

Thanks for the response. I have done that and it still shows the right sidebar.

Yes well I somewhat did. I deleted all the code for sidebar in the theme editor. Then I fixed the width of the container by looking for .grid: float: width:75% and changing it to 100% which adjusted text. No idea if this was the way to fix this issue but I don't need any sidebars for this site. Thanks for checking.

I deleted all the code for sidebar in the theme editor.

That's a pretty bad idea - this change will get erased when you update the theme.

The options in the customizer should absolutely work but we certainly need some more time/steps to debug why it isn't working for you.

This archived topic is closed to new replies.