Community Forums › Forums › Archived Forums › Design Tips and Tricks › Education + Sensei Correct wrapper code for theme
- This topic has 19 replies, 6 voices, and was last updated 10 years, 6 months ago by DTHkelly.
-
AuthorPosts
-
March 23, 2013 at 12:46 am #30634ArachneMember
I am using the Sensei plugin in the Education theme. Having copied wrapper-start and wrapper-end.php files to the theme, as suggested by Woo support, I am now stuck with editing the correct code to display the body content of a Course, Lesson, or Quiz.
Currently the content is displayed in the default (content#sidebar#sidebar) width, with the sidebar pushed down below the content. I am out of my depth here.
Further, in trying to display the body content of a single Course, Lesson, or Quiz, just with a primary sidebar, I am able to display this format for the course and lesson archive pages, as these pages are addressable through Sensei & layout settings, however when it comes to the single Course, lesson or quiz pages they use the default template. (content#sidebar#sidebar)
If anyone has a solution to these issues I would be much obliged for the support - Tony My site address
April 25, 2013 at 3:00 pm #37726cehwithamMemberHi Tony,
The homepage looks good and the lesson listings I can see seem to have a sidebar but with nothing assigned to it. It does however appear to be outputting in the right location.
If this is not the case and there is still a problem, please can you link to a specific page and I'll take a look for you. From what you've said, it may just be a case of editing the CSS.
Chris
Twitter: cehwitham Web: cehwitham.com
April 26, 2013 at 6:10 am #37814ArachneMemberHi Chris,
Thanks for your interest, I am still trying to solve this. Possibly what you have viewed is sensei loaded onto a wootheme to get the formatting to work. I would rather not go this way, rather loaded on a genesis template.
Here is a link to <a href="http://teach.nlaschool.org/courses-overview/" title="Courses" > where I can control the template choice. When you activate a course the problem becomes apparent, eg <a href="http://teach.nlaschool.org/course/visual-arts-theory-12/" title="Visual Arts Theory 12" >The #sidebar1 is now situated below the course post and the content body is narrow fitting into the default template of #content#sidebar1#sidebar2. At this stage I cannot specify the template to use.
When you go to the individual lesson <a href="http://teach.nlaschool.org/lesson/search-for-an-african-identity-in-south-african-art/" title="1. Search for an African Identity in South African Art" > the same layout applies (#sidebar1 displays below post). If you scroll down the lesson and take the lesson quiz at the bottom of post, <a href="http://teach.nlaschool.org/quiz/search-for-an-african-identity-in-south-african-art-quiz/" title="Search for an African Identity in South African Art Quiz" > the same applies.
I have followed the instructions supplied for <a href="http://docs.woothemes.com/document/sensei-theming/" title="Sensei Theming" > as far as copying up the wrapper-start.php & wrapper-end.php to my education theme root in a sensei folder.
Please let me know if this makes sense to you and thanks again for taking a look at this for me.
Regards,
Tony
April 26, 2013 at 9:54 am #37865ArachneMemberHi Chris,
I think I may have solved the problem. Sensei adds its own wrappers around the content automatically during installation. Code replacing the Sensei wrappers with the standard Genesis wrappers added to my child functions file seems to have corrected the issue.
Thanks again for showing an interest - Regards, Tony
/**** Theme Compatibility for Integrating Sensei with Genesis Framework/Child Theme *********/
remove_action( 'sensei_before_main_content', 'sensei_output_content_wrapper', 10 );
remove_action( 'sensei_after_main_content', 'sensei_output_content_wrapper_end', 10 );add_action( 'sensei_before_main_content', 'edu_theme_wrapper_start', 10 );
add_action( 'sensei_after_main_content', 'edu_theme_wrapper_end', 10 );function edu_theme_wrapper_start() {
do_action( 'genesis_before_content_sidebar_wrap' );
echo '<div id="content-sidebar-wrap"><div id="content">';
}function edu_theme_wrapper_end() {
echo '</div></div>';
}April 26, 2013 at 10:00 am #37867ArachneMemberHi Chris,
It solves the wrapper but still uses the default theme template to display individual lessons and quizzes. can you help with a way to call #content#sidebar for the single lesson and quiz?
Regards, Tony
April 28, 2013 at 1:56 am #38168cehwithamMemberHi Tony,
I'm glad you've made progress. I can't seem to view an individual lesson without signing up for a course and I can't see where to do that.
Where are you using the code you mentioned above? In functions.php? If you're using it in a page template then you'l also need to add it to the single course template file. You may need to create something like single-lesson.php (or whatever they use as a filename within your child theme folder.
Twitter: cehwitham Web: cehwitham.com
May 3, 2013 at 2:42 pm #39172TerriMemberChris... I'm having the same problem with Sensei and the Executive theme; My sidebar on the lessons and courses pages are being pushed down below the content area. I've received conflicting instructions from the Sensei crew, which also conflicts with what's in their written document. As Tony has no doubt noticed, the written instructions say to copy over (only) 2 files in the wrappers folder: wrapper-start and wrapper-end. However, in email, I was told to copy over ALL files and folders, and then edit the wrapper-start and end. None of this is working, and I must resolve this issue by tomorrow, at the latest.
Can you help fix this problem? If payment is needed, just let me know how much. There's not much room left in the budget, but I'm sure I can pay something for your time. 🙂
Terri
May 4, 2013 at 3:52 am #39222ArachneMemberHi Terri,
Have you tried my earlier stated solution, the code to be placed in your theme functions file. I too found Sensei support very misleading and not functional for compatibilty with genesis. The above code has worked for me, then with css styling of divs content-sidebar-wrap and content you can affect the width of the individual pages. <a href="http://teach.nlaschool.org/course/visual-arts-theory-12/" target="_blank">Here</a> is my solution thus far. my next issue is getting rid of the sidebar on the single pages. The default template of the theme is used and I cannot find a way to replace it for the single pages.
Regards,
Tony
May 4, 2013 at 3:00 pm #39300TerriMemberHi Tony,
As fate would have it, someone from this forum fix ALL of the Sensei pages (in record-breaking time and extremely reasonable rates). It didn't require any funky Woo Codes to be added to functions.php, or anywhere else. Now the site looks AWESOME, with NO thanks to those so-called "Woo Ninjas."
Terri
May 4, 2013 at 10:42 pm #39318ArachneMemberHi Terri,
Excellent news, is there a way I can contact the Sensei fixer or do you know what was done to facilitate your solution?
Regards,
Tony
May 8, 2013 at 3:12 am #39837cehwithamMemberHi Terri,
I can't see your last reply as it was marked as private.
Do you still need assistance with this or is it resolved now?
Chris
Twitter: cehwitham Web: cehwitham.com
May 8, 2013 at 5:24 am #39845AnitaCKeymasterHi Chris, I was working with Terri on this and someone else from the forum helped her offline. She hasn't provided the solution but it would be nice if someone would. When I was doing research there are quite a number of people looking for this to work with Genesis and there just hasn't been anyone to post the answer. It will work if the information is placed in the Sensei wrapper PHP files as they instruct. I see this Genesis Sensei Woocommerce combination being one that people are going to ask over and over again and would be nice to have a definitive answer as to the correct way it's done so there are 50 discussions up here with no resolution.
Need help with customization or troubleshooting? Reach out to me.
May 8, 2013 at 8:15 am #39877SusanModeratorChris - since you were involved in assisting the original poster, I have edited the "private" posts.
The point of private posts is to provide a link to information you don't wish to be made available to the public, or for troubleshooting when the issue needs to remain private. That was not the case here.
May 8, 2013 at 9:29 am #39891cehwithamMemberThanks Susan.
As Anitac said, it would be nice if the solution could be shared or at least given that it was paid for, the person who did the work to be identified so other people could contact them for similar issues.
Chris
Twitter: cehwitham Web: cehwitham.com
May 8, 2013 at 10:18 am #39904TerriMemberAll -- Sorry for not getting back to this post after the problem was resolved. I've been extremely busy and had no idea that this was still an issue for some people until I saw your posts in my email this morning.
Susan - The reason I made my comment private is because of SP's association with Woo. I didn't feel it would be appropriate to slam Woo in public, but obviously (since you took it upon yourself to remove my private comment) it's okay to do so. With that said....
Woo's instructions did NOT work, and at best, all I could get out of the Woo's non-support team was, "Read the instructions," or "We cannot help you beyond what is stated in our support policy."
As for all of that add this to to PHP , or add this to wrapper, stuff was/is useless.
The problem was resolved in CSS. I hired David Chu, from this forum. He is the only one who knew exactly what was causing the problem, and exactly how to fix it. He's definitely worth hiring for this, and for ANYTHING having to do with Genesis!
May 8, 2013 at 10:21 am #39905SusanModeratorTerri - I didn't see it as a slam on Woo; I felt it was appropriate to open it up so that the person who was assisting the original poster could get some insight into whether the issue had been resolved.
Thanks for letting us know who assisted - it's great to have referrals to resources who can help the StudioPress community.
May 8, 2013 at 10:29 am #39908TerriMemberSusan - I just don't like saying negative things about anyone, or any product, that SP touts. I've had a few folks from the Genesis/SP team offer solutions to this problem that also didn't work. David is, in my humble opinion, the Go To person for resolving Genesis issues, and especially for this one.
May 8, 2013 at 10:56 am #39915AnitaCKeymasterI tried to assist you Terri by asking to see the other files and setup since Sensei is a paid product and you need a product key to install it. The instructions were to add to the files structure that came inside the Sensei itself. I understand David provided you with a CSS fix but that wasn't my goal. I was trying to do it the way of the instructions. David has helped me on one of my own projects as well as a lot of other more experienced Genesis developers.
Need help with customization or troubleshooting? Reach out to me.
May 8, 2013 at 11:08 am #39918TerriMemberYes; I know you did. And I appreciated it. As I mentioned, their instructions were useless...and pointless.
I think I've been very fortunate over the years when it comes to All Things Genesis. Very seldom, if ever, do I need any sort of fix. Genesis -- as well as all of SP's Child Themes -- always seem to work without a hitch. Unlike my personal experiences with WooStuff.
June 10, 2014 at 1:05 pm #108799DTHkellyMemberGenesis Magazine Pro/Genesis CSS from the WooThemes Sensei Forum Posted By Rob Cubbon:
Sidebar dropping below content issue in Genesis Magazine Pro theme
There's a fix in the documentation for this issue of the sidebar dropping below content on the Sensei pages (Courses, Lessons, etc.) The fix (I can't find it now) involves changing the /wrappers/wrapper-start.php and /wrappers/wrapper-end.php which seemed quite confusing at the time.Anyway, I found a nice CSS fix for this issue that will work on any theme with a quick identification of the correct selectors and declarations using Developer Tools.
This how I did it with Magazine Pro theme.
Go to a "normal" page like the home page here: http://learn.robcubbon.com/ go Cmd/Ctrl-Shift-I to get Developer Tools and select (with magnifying glass icon if you're using Chrome) the content area. This shows the containing element's style that gives it the proper width so it fits in with the sidebar and in Magazine Pro (and probably a lot of other Genesis themes) this is it:
.content {
float: right;
width: 750px;
}Now if you go to a Sensei course page, for example: http://learn.robcubbon.com/course/make-money-running-a-web-design-business/ and perform the same function with Developer Tools you won't find the .content, you will find in it's place a .col-left selector. So this is the containing div that Sensei puts in and needs to be styled in order to give the content area its proper width.
.col-left { float: left; width: 750px; }
All well and good. But it isn't. Because Genesis Magazine Pro theme is responsive like all good themes should be, you have to add .col-left to the media queries everywhere .content is.
Firstly, @media only screen and (max-width: 1139px) add .col-left to the .content declaration:
.col-left , .content { width: 630px; }
And secondly @media only screen and (max-width: 1023px) add .col-left to the .content declaration:
.col-left , .content, .content-sidebar-sidebar .content, .content-sidebar-sidebar .content-sidebar-wrap, .footer-widgets-1, .footer-widgets-2, .footer-widgets-3, .home-middle .featured-content .entry, .sidebar-content-sidebar .content, .sidebar-content-sidebar .content-sidebar-wrap, .sidebar-primary, .sidebar-secondary, .sidebar-sidebar-content .content, .sidebar-sidebar-content .content-sidebar-wrap, .site-header .widget-area, .title-area { width: 100%; }
... it looks complicated but it's just three changes in the style.css of the Child Theme.
I hope this helps somebody.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.