Skip to content

Commit

Permalink
Allow sidebars to show in the custom Blog Posts page
Browse files Browse the repository at this point in the history
Adds the ability to show the sidebars when using a custom Blog Posts page set via Settings->Reading.

Fixes #28
  • Loading branch information
marksabbath committed Jul 3, 2019
2 parents c44b89a + f42b9c0 commit e5d32cc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions includes/class-genesis-simple-sidebars-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ public function sidebars_widgets_filter( $widgets ) {

$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 ),
);

}
Expand Down

0 comments on commit e5d32cc

Please sign in to comment.