How to apply Full Width Content Layout to a CPT’s single pages in Genesis

Looking to force Full Width Content layout to all the singular pages of a Custom Post Type in Genesis so there’s no sidebar?

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

add_filter( 'genesis_pre_get_option_site_layout', 'custom_cpt_layout' );
/**
 * Force full width content on single entries of Portfolio CPT.
 */
function custom_cpt_layout() {
	if ( is_singular( 'portfolio' ) ) {
		return 'full-width-content';
	}
}

Replace portfolio with the name of your CPT.
If you are using Genesis Sample 2.6.0, add the following in its style.css:

.single-portfolio .content {
	width: 100%;
}
This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.