Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Integrate GP with Sensei
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
You can’t perform that action at this time.