Skip to content

Instantly share code, notes, and snippets.

@stuartduff
Created March 18, 2015 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stuartduff/8d9c59c8a0e61f4c2ebe to your computer and use it in GitHub Desktop.
Save stuartduff/8d9c59c8a0e61f4c2ebe to your computer and use it in GitHub Desktop.
The Theme Foundry - Make Theme Sensei Wrappers
add_action( 'init', 'init_sensei_hooks' );
function init_sensei_hooks() {
global $woothemes_sensei;
remove_action( 'sensei_before_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper' ), 10 );
remove_action( 'sensei_after_main_content', array( $woothemes_sensei->frontend, 'sensei_output_content_wrapper_end' ), 10 );
add_action('sensei_before_main_content', 'my_theme_wrapper_start', 10);
add_action('sensei_after_main_content', 'my_theme_wrapper_end', 10);
}
function my_theme_wrapper_start() {
ttfmake_maybe_show_sidebar( 'left' );
echo '<main id="site-main" class="site-main" role="main">';
}
function my_theme_wrapper_end() {
echo '</main>';
ttfmake_maybe_show_sidebar( 'right' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment