Last active
May 16, 2017 21:53
-
-
Save generatepress/d34e913acad534ffaa16 to your computer and use it in GitHub Desktop.
Integrate GP with Sensei
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( 'after_setup_theme','generate_remove_sensei_default' ); | |
function generate_remove_sensei_default() | |
{ | |
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_theme_support( 'sensei' ); | |
} | |
add_action('sensei_before_main_content', 'generate_sensei_wrapper_start', 10); | |
add_action('sensei_after_main_content', 'generate_sensei_wrapper_end', 10); | |
function generate_sensei_wrapper_start() { | |
?> | |
<div id="primary" <?php generate_content_class();?>> | |
<main id="main" <?php generate_main_class(); ?> itemprop="mainContentOfPage" role="main"> | |
<?php do_action('generate_before_main_content'); ?> | |
<?php } | |
function generate_sensei_wrapper_end() { | |
do_action('generate_after_main_content'); | |
?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php | |
do_action('generate_sidebars'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment