Salient v14.0 (11/15/2021) is out now!

After updating, remember to clear the cache from any performance plugins you have active as well as your browser cache.

Once you've updated your theme, make sure to also update your Salient plugins to get access to the new features.

Click here to view the update guide

View Changelog

Okay
  Print

Salient Theme Sensei Support .

The Below Code add Sensei Plugin Support to the Salient Theme .


Reference URL: https://docs.woocommerce.com/document/sensei-and-theme-compatibility/


Add this to your Child Theme functions.php or using the Code Snippets Plugin:


For Fullwidth Page :

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="container-wrap"><div class="container main-content"><div class="row">';
}
function my_theme_wrapper_end() {
  echo '</div><!--/row--></div><!--/container--></div><!--/container-wrap-->';
    
}
add_action( 'after_setup_theme', 'declare_sensei_support' );
function declare_sensei_support() {
    add_theme_support( 'sensei' );
}

For Page With Sidebar :

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="container-wrap"><div class="container main-content"><div class="row">';
      echo '<div id="post-area" class="col span_9"> <div class="posts-container">';
            
}
function my_theme_wrapper_end() {
    echo '</div><!--/posts container--></div><!--/span_9--></div><!--/row--></div><!--/container--></div><!--/container-wrap-->';
    echo '<div id="sidebar" class="col span_3 col_last">';
    get_sidebar();
    echo '</div><!--/span_3-->';
    
}
add_action( 'after_setup_theme', 'declare_sensei_support' );
function declare_sensei_support() {
    add_theme_support( 'sensei' );
}



Best.