Allow sidebars to show in the custom Blog Posts page

Adds the ability to show the sidebars when using a custom Blog Posts page set via Settings->Reading.

Fixes #28
This commit is contained in:
Marcos Antonio Schratzenstaller
2019-07-03 11:26:08 -03:00
committed by GitHub
@@ -95,12 +95,14 @@ class Genesis_Simple_Sidebars_Core {
$sidebars = array();
if ( is_singular() ) {
if ( is_singular() || is_home() && isset( get_queried_object()->ID ) ) {
$post_id = get_queried_object()->ID;
$sidebars = array(
'sidebar' => genesis_get_custom_field( '_ss_sidebar' ),
'sidebar-alt' => genesis_get_custom_field( '_ss_sidebar_alt' ),
'header-right' => genesis_get_custom_field( '_ss_header' ),
'sidebar' => genesis_get_custom_field( '_ss_sidebar', $post_id ),
'sidebar-alt' => genesis_get_custom_field( '_ss_sidebar_alt', $post_id ),
'header-right' => genesis_get_custom_field( '_ss_header', $post_id ),
);
}