Skip to content

Commit

Permalink
Forces content-sidebar layout on singular course, lesson and question
Browse files Browse the repository at this point in the history
  • Loading branch information
christophherr committed Mar 11, 2016
1 parent fa3e1d6 commit 8227ed2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions genesis-connect-for-woothemes-sensei.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,18 @@ function gcfws_sensei_support() {

add_action( 'after_setup_theme', 'gcfws_sensei_support' );

/**
* Force content-sidebar layout on Woothemes Sensei Course, Lesson and Question pages.
* @since 1.1
*/
function gcfws_force_content_sidebar_layout() {
if ( is_singular( array( 'course', 'lesson', 'question' ) ) ) {
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
}
}

add_action( 'genesis_meta', 'gcfws_force_content_sidebar_layout' );

/**
* Remove the default Sensei wrappers
*/
Expand Down

0 comments on commit 8227ed2

Please sign in to comment.