Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save danjjohnson/549c40711c4ec074692222e0a2f182c9 to your computer and use it in GitHub Desktop.

Select an option

Save danjjohnson/549c40711c4ec074692222e0a2f182c9 to your computer and use it in GitHub Desktop.
Sensei Enfold theme integration - May 2017
global $woothemes_sensei;
global $avia_config;
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() {
if( get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title();
do_action( 'ava_after_main_title' );
?>
<div class='container_wrap container_wrap_first main_color <?php avia_layout_class( 'main' ); ?>'>
<div class='container'>
<main class='template-page content <?php avia_layout_class( 'content' ); ?> units' <?php avia_markup_helper(array('context' => 'content','post_type'=>'page'));?>> <?php
}
function my_theme_wrapper_end() {
?> </main>
<?php
//get the sidebar
$avia_config['currently_viewing'] = 'page';
get_sidebar();
?>
</div><!--end container-->
</div><!-- close default .container_wrap element -->
<?php }
add_action( 'after_setup_theme', 'declare_sensei_support' );
function declare_sensei_support() {
add_theme_support( 'sensei' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment