From f42b9c04db6ec7f3fcdb0123fe21f463c77ba163 Mon Sep 17 00:00:00 2001 From: Marcos Schratzenstaller Date: Mon, 1 Jul 2019 17:28:17 -0300 Subject: [PATCH] Allow sidebars to show in the custom Blog Posts page --- includes/class-genesis-simple-sidebars-core.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/class-genesis-simple-sidebars-core.php b/includes/class-genesis-simple-sidebars-core.php index 74eef80..c1fe034 100644 --- a/includes/class-genesis-simple-sidebars-core.php +++ b/includes/class-genesis-simple-sidebars-core.php @@ -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 ), ); }