Tagged: x
-
AuthorPosts
-
August 17, 2016 at 1:15 am #1134754
wyckoffsmiParticipantI am looking for a little help on displaying the sensei sidebar on xtheme integrity
You can see my issue here http://wyckoffsmi.com/courses-overview/
I have read through all existing documentation on the forum and woocommerce but have not had any success. Any help would be greatly appreciated currently I have modified the functions.php of my child theme with the following content.
/** * Declare that your theme now supports Sensei */ add_action( 'after_setup_theme', 'sensei_support' ); function sensei_support() { add_theme_support( 'sensei' ); } /** * Remove the default Sensei wrappers */ 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 X Theme by Themeco specific custom Sensei content wrappers */ add_action('sensei_before_main_content', 'x_theme_sensei_wrapper_start', 10); add_action('sensei_after_main_content', 'x_theme_sensei_wrapper_end', 10); function x_theme_sensei_wrapper_start() { if ( is_singular( 'course' ) ){ remove_action( 'woocommerce_before_single_product', 'x_woocommerce_before_single_product', 10 ); remove_action( 'woocommerce_after_single_product', 'x_woocommerce_after_single_product', 10 ); } echo '<div class="x-container max width offset">'. '<div class="x-main left" role="main">' .'<div class="entry-wrap"> '; } function x_theme_sensei_wrapper_end() { echo ' </div> <!-- .entry-wrap -->' . '</div> <!-- end sensei .x-main left-->'; get_sidebar(); echo'</div> <!-- end sensei x-container-fluid -->'; } /** * remove default sensei titles */ remove_action( 'sensei_course_single_title', array( $woothemes_sensei->frontend , 'sensei_single_title' ), 10 ); remove_action( 'sensei_lesson_single_title', array( $woothemes_sensei->frontend , 'sensei_single_title' ), 10 ); remove_action( 'sensei_quiz_single_title', array( $woothemes_sensei->frontend, 'sensei_single_title' ), 10 ); remove_action( 'sensei_message_single_title', array( $woothemes_sensei->frontend, 'sensei_single_title' ), 10 ); /** * Add custom theme title: */ add_action( 'sensei_course_single_title', 'x_theme_sensei_single_title', 10 ); add_action( 'sensei_lesson_single_title', 'x_theme_sensei_single_title', 10 ); add_action( 'sensei_quiz_single_title', 'x_theme_sensei_single_title', 10 ); add_action( 'sensei_message_single_title', 'x_theme_sensei_single_title' , 10 ); function x_theme_sensei_single_title() { global $post; if( is_singular( 'sensei_message' ) ) { $content_post_id = get_post_meta( $post->ID, '_post', true ); if( $content_post_id ) { $title = sprintf( __( 'Re: %1$s', 'woothemes-sensei' ), '<a href="' . get_permalink( $content_post_id ) . '">' . get_the_title( $content_post_id ) . '</a>' ); } else { $title = get_the_title( $post->ID ); } } else { $title = get_the_title(); } ?> <header class="entry-header"> <h1 class="entry-title"> <?php echo $title;?> </h1> </header> <?php }August 17, 2016 at 4:53 am #1134939
ChristopherModeratorHi there,
Please provide us with login credentials so we can take a closer look, but we can’t guarantee that we’ll be able to help you with this since it’s related to third party plugin and we don’t provide support for third party plugins.
Thanks.
August 17, 2016 at 1:37 pm #1135560
wyckoffsmiParticipantThis reply has been marked as private.August 17, 2016 at 9:28 pm #1136149
LelyModeratorHi There,
Since you’re using a fullwidth content layout from Appearance > Customize > Layout and Design please replace this line of your code:
get_sidebar();
With this:<aside class="<?php x_sidebar_class(); ?>" role="complementary"> <?php if ( get_option( 'ups_sidebars' ) != array() ) : ?> <?php dynamic_sidebar( apply_filters( 'ups_sidebar', 'sidebar-main' ) ); ?> <?php else : ?> <?php dynamic_sidebar( 'sidebar-main' ); ?> <?php endif; ?> </aside>This line
get_sidebar();will only return your sidebar if your global layout is not fullwidth or if you’re using Content Left, Sidebar Right/Sidebar Left, Content Right.Hope this helps.
August 18, 2016 at 3:00 pm #1137391
wyckoffsmiParticipantWhere in what file or area would I make this substition?
August 18, 2016 at 3:19 pm #1137427
wyckoffsmiParticipantsorry posted twice
August 18, 2016 at 3:20 pm #1137429
wyckoffsmiParticipant.please disregard this screen shot
August 18, 2016 at 3:30 pm #1137453
wyckoffsmiParticipantThe last two posts were mistakes, Where in what file or area would I make this substition? With the suggestion code above. When I add it in the functions.php in the child theme file I get a syntax error.
August 18, 2016 at 7:54 pm #1137749
RadModeratorHi there,
Please replace this code,
function x_theme_sensei_wrapper_end() { echo ' </div> <!-- .entry-wrap -->' . '</div> <!-- end sensei .x-main left-->'; get_sidebar(); echo'</div> <!-- end sensei x-container-fluid -->'; }with this,
function x_theme_sensei_wrapper_end() { ?> </div> <!-- .entry-wrap --> </div> <!-- end sensei .x-main left--> <aside class="<?php x_sidebar_class(); ?>" role="complementary"> <?php if ( get_option( 'ups_sidebars' ) != array() ) : ?> <?php dynamic_sidebar( apply_filters( 'ups_sidebar', 'sidebar-main' ) ); ?> <?php else : ?> <?php dynamic_sidebar( 'sidebar-main' ); ?> <?php endif; ?> </aside> </div> <!-- end sensei x-container-fluid --> <?php }Hope this helps.
August 19, 2016 at 2:53 pm #1138668
wyckoffsmiParticipantI have made this changed however the layout remains the same with the side bar cut off below the main content.
August 19, 2016 at 9:17 pm #1139071
Rue NelModeratorHello There,
Thanks for the updates! I went ahead and modified the code. The sidebar is now showing. I ended up using this code:
function x_theme_sensei_wrapper_end() { ?> </div></div> <!-- .entry-wrap --> </div> <!-- end sensei .x-main left--> <aside class="<?php x_sidebar_class(); ?>" role="complementary"> <?php if ( get_option( 'ups_sidebars' ) != array() ) : ?> <?php dynamic_sidebar( apply_filters( 'ups_sidebar', 'sidebar-main' ) ); ?> <?php else : ?> <?php dynamic_sidebar( 'sidebar-main' ); ?> <?php endif; ?> </aside> </div> <!-- end sensei x-container-fluid --> <?php }If you need anything else, please let us know.
August 20, 2016 at 3:23 am #1139290
wyckoffsmiParticipantI just want to take a second to let you know that your theme and everything is great but what separates your company from the rest is the customer service and dedication to helping your clients! You guys always go above and beyond what is required as a theme creator to help people achieve the look and the functions they are looking for. I hope this single message doesn’t get lost in the hundreds posted by you guys are great and we will continue to use and support your products because of this.
Thanks.
August 20, 2016 at 3:31 am #1139298
Rue NelModeratorHello There,
You’re most welcome! We’re happy to help you out.
If you need anything else we can help you with, don’t hesitate to open another thread. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1134754 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
