astralogo01

Remove sidebar and make shop pages wider with Astra WordPress theme

I had an issue with the Astra wordpress theme and my Woocommerce store pages. I was stuck with a sidebar that I wasn’t using. Astra sent me the following code to remove the sidebar:

add_filter( 'astra_page_layout', 'no_sidebar_shop_page' );
function no_sidebar_shop_page( $sidebar ) {
if ( is_shop() ) {
$sidebar = 'no-sidebar';
}
return $sidebar;
}

This is to go into the functions.php file – create a child theme first.

This did that job but the content was too far over to the left and the sidebar space was still there.  I searched online and found this code:

body.woocommerce div#primary {
width: 100%;
}

body.woocommerce div#secondary {
display: none;
}

And to remove the page titles use code:

.page-title{display:none;}

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Subscribe To Our Newsletter

Join our mailing list to receive the latest DEALS, OFFERS and News before anyone else.

You are almost done - please check your inbox for confirmation!

Pin It on Pinterest

Share This
Scroll to Top