Created
March 18, 2015 13:25
-
-
Save stuartduff/8d9c59c8a0e61f4c2ebe to your computer and use it in GitHub Desktop.
The Theme Foundry - Make Theme Sensei Wrappers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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