How to remove Sidebar for Blog, Archives and Posts page in Genesis

Posted on

Want to set Full Content layout for Blog, Archives and Posts page in Genesis with other pages of the site having a Content Sidebar layout?

Go to theme settings and set Content Sidebar layout as the default.

Then add the following in child theme’s functions.php:

// Apply Full Width Content layout to Posts page, Single Posts and Archives.
add_action( 'get_header', 'sk_set_full_layout' );
function sk_set_full_layout() {
	if ( ! ( is_home() || is_singular( 'post' ) || is_archive() ) ) {
	// Force full width content
	add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );