Skip to content

Instantly share code, notes, and snippets.

@beaverbuilder
Last active March 29, 2018 21:39
Show Gist options
  • Save beaverbuilder/9b9419b7f147ee57bd5186bba22739c1 to your computer and use it in GitHub Desktop.
Save beaverbuilder/9b9419b7f147ee57bd5186bba22739c1 to your computer and use it in GitHub Desktop.
This snippet is used on the following knowledge base article - http://kb.wpbeaverbuilder.com/article/582-integrate-sensei-with-the-beaver-builder-theme
<?php // Do not copy this line, start with line 3
// Sensei unhook
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() {
echo '<div class="fl-content-full container">
<div class="row">
<div class="fl-content fl-content-left col-md-8">';
}
function my_theme_wrapper_end() {
echo '</div>';
get_sidebar();
echo "</div>
</div>";
}
add_action( 'after_setup_theme', 'declare_sensei_support' );
function declare_sensei_support() {
add_theme_support( 'sensei' );
}
@thehackermonkey
Copy link

Hey guys, I placed the code at the end of the file , cleared all cache (client and server side) but didn't work. Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment