Tagged: x
-
AuthorPosts
-
January 25, 2017 at 3:20 pm #1345275
MarcodewitParticipantHello!
I would like to ask for a little help with the container setup for Sensei within my Ethos theme setting.
I read through all documentation and followed the guidelines Sensei setup for compatability with X.
See below the code that I added in the functions.php of my Child theme.
It seems to work for a large part, whereby courses give a proper container setup (see screenshot 1), but somehow the lessons have the bottom part not aligned properly (see screenshot 2).
Can you help me?
Thanks so much,
Marco
http://www.harmonycentershop.nlCode added to the functions.php:
/** * 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 }January 25, 2017 at 8:15 pm #1345712
RadModeratorHi there,
Thanks for posting in.
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentials
– URL where the integration’s procedure is given
– URL of how should they look likeDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks!
January 26, 2017 at 2:27 am #1345997
MarcodewitParticipantThis reply has been marked as private.January 26, 2017 at 2:36 am #1346006
MarcodewitParticipantThis reply has been marked as private.January 26, 2017 at 1:49 pm #1346719
RadModeratorHi Marco,
Seems to be okay. But I’m not sure what should go for lesson page, would you mind providing a complete sample of you’re expecting to see on that page? It looks like it uses a different template, I need to confirm how it looks.
We only provided the wrapper integration, but not the content rendered within.
Thanks!
January 26, 2017 at 3:08 pm #1346817
MarcodewitParticipantHi there,
I understand, only the lessons are still being developed by the teachers. I hope to have this soon.
* For now I wonder why the green x-footer part underneath the lessons is squeezed. See attached screenshots. It has white area’s to the left and right of it. Do you know how I can get this full width (the same as the course page and all other pages)?
* Also the lesson title seems to be doubled somehow in the page. Any idea how I can display this title once?
Thanks!!
Cheers
MarcoJanuary 26, 2017 at 8:51 pm #1347200
RadModeratorHi there,
Please update your code to this
/** * 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">'; } function x_theme_sensei_wrapper_end() { echo '</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 }Hope this helps.
January 27, 2017 at 7:45 am #1347738
MarcodewitParticipantThis reply has been marked as private.January 27, 2017 at 5:08 pm #1348297
RadModeratorHi there,
I think this should do it,
/** * 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() { 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 }The wrapper is doubled, the other one has no closing element.
Hope this helps.
February 1, 2017 at 4:44 am #1353441
MarcodewitParticipantYep,
This works excellent.
Thanks so much.
February 1, 2017 at 5:36 am #1353515
LelyModeratorYou’re welcome!
Cheers!
March 6, 2017 at 10:30 am #1396432
MarcodewitParticipantHi there,
Could you please help me with some styling issues for a course page?
1) I’m looking for a way to change the title size on a course page?
For instance, this is one of the course pages: http://harmonycentershop.nl/cursus/gratis-cursus-haal-de-natuur-in-huis/
2) Also, I do not want to use the sidebar on the course page, how can I make it go full-width?
3) Same question for the lesson pages: how can I change the title size? And how to go full-width (no side-bar)?
For instance, this is one of the sample lesson pages: http://harmonycentershop.nl/les/les-1-voorstelling/
Thank you!
Cheers,
MarcoMarch 6, 2017 at 11:54 am #1396558
RupokMemberHi Marco,
Although we can’t help on such customization but as you have comes so far, I’ll try to point you to achieve them.
You can add this under Custom > CSS in the Customizer.
.single-course header > h1, .single-lesson header > h1 { font-size: 40px; } .single-course .x-main.left, .single-lesson .x-main.left { width: 100%; padding: 0; float: none; }Hope this will do the job. Let’s adjust the font-size.
Cheers!
March 6, 2017 at 12:36 pm #1396611
MarcodewitParticipantSuper!
Thanks so much
MMarch 6, 2017 at 12:45 pm #1396624
JoaoModeratorYou are welcome 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1345275 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
