In Genesis Page specific layouts override the default layout from theme settings. But the same does not apply for the Page set as Posts page (in Settings > Reading). Regardless of what layout you select when editing this Page, the default layout will continue to be used unless the following code is added in the child theme’s functions.php:
/** | |
* Make Posts page obey its Page layout setting | |
*/ | |
add_filter( 'genesis_pre_get_option_site_layout', 'sk_do_posts_page_layout' ); | |
function sk_do_posts_page_layout( $opt ) { | |
if ( ! is_home() ) { | |
return; | |
} | |
$opt = get_post_meta( get_option( 'page_for_posts' ), '_genesis_layout', true ); | |
return $opt; | |
} |
Sample screenshots:
Genesis > Theme Settings:
Settings > Reading:
Blog Page:
Before:
After:
Source: David Wang‘s related gist for WooCommerce in the Genesis Slack group Gistbox.
[…] can use the code from How to make Posts page obey its Page layout setting in Genesis article and tweak it so that layout selected for the Members page (auto generated when BuddyPress […]