BuddyBoss Home – Web › Support Forums › Solutions › Social Learner › How to move lesson navigation below Lesson Title?
- This topic has 10 replies, 4 contibutors, and was last updated 8 years, 11 months ago by Anonymous.
Question
November 26, 2015 at 4:45 pm #52895@mln83I would like to move the Lesson navigation below the Lesson title area.
Any help is much appreciated.
Best regards,
MichaelAnswers
November 27, 2015 at 7:42 am #52926@
AnonymousHi @mln83, You will have to edit the lesson.php in Learndash.
Copy file from: /wp-content/plugins/boss-learndash/templates/learndash/lesson.php
And paste it to Social Learner Child theme… the file path should be:
/wp-content/themes/social-learner/boss-learndash/templates/learndash/lesson.phpIn learndash.php move this code: (line 29-36)
<div id='post-entries'> <div class="nav-prev"> <?php echo learndash_previous_post_link(); ?> </div> <div class="nav-next"> <?php echo learndash_next_post_link(); ?> </div> </div>
at line 60.
Regards
PallaviNovember 27, 2015 at 12:25 pm #52951@mln83Hi @pallavi,
Thanks for the feedback. I have implemented the changes above and moved the file into
/wp-content/themes/social-learner/boss-learndash/templates/learndash/lesson.phpI then cleared cache and tried to disable and enable Social Learner theme. Unfortunately it doesn’t seem to load the changes from the modified .php file.
Besides altering the original code from the plugin ‘Boss for LearnDash’ is there something I can do to ensure that the child theme loads the modified .php file?
Best regards,
MichaelNovember 27, 2015 at 12:41 pm #52953@
AnonymousHi @mln83, Please do the same within plugin file see if it’s reflecting and changes is working there.
Regards
PallaviNovember 27, 2015 at 12:54 pm #52955@mln83Hi @pallavi,
Just tested by modifying the plugin file directly and it works fine. I guess it’s because it’s a plugin and child themes apparently cannot modify plugin behaviour. Seems to be confirmed here:
http://wptavern.com/how-to-extend-a-wordpress-plugin-without-losing-your-changes
While I can modify the ‘Boss for LearnDash’ plugin I will loose the changes next time you update the plugin. It would be great if you could either include the changes (I personally think it looks better – just need a bit more CSS tweaking from my side to align with the ‘Course Progress’ in the right panel) or perhaps include an option for hooks in a future version of ‘Boss for LearnDash’ plugin to allow users to easily customize parts of Social Learner 🙂
Thanks again for taking your time to help out.
Best regards,
MichaelNovember 27, 2015 at 1:47 pm #52963@
AnonymousHi @mln83, You do not have to edit the plugin I have asked just to test yourself which file is in action..The path will be: /wp-content/themes/social-learner/learndash/lesson.php
Just because Lesson navigation is in other div and lesson’s title is in another division so it was better to edit the codes instead of css.
You have tested with same path but it was not working might be due to any issue that’s why I had suggested to edit the plugin files for temp
November 27, 2015 at 3:02 pm #52969@mln83Hi @pallavi,
I tested by adding the modified file to the following path:
/wp-content/themes/social-learner/learndash/lesson.php
and also
/wp-content/themes/social-learner/boss-learndash/templates/learndash/lesson.php
but it doesn’t work.It only works when I modify
/wp-content/plugins/boss-learndash/templates/learndash/lesson.php
directly.November 28, 2015 at 2:23 pm #53015@mln83Hi @pallavi,
Thanks again for trying to help.
If you want to redo my attempts I can also provide access to my developer site in a private message?
Best regards,
MichaelDecember 17, 2015 at 2:20 pm #54639@digitalmarketerDid this get resolved. I am having the same issue.
December 17, 2015 at 2:27 pm #54643@mln83No unfortunately support never got back.
The only solution I have found is to manually edit:
/wp-content/plugins/boss-learndash/templates/learndash/lesson.phpfollowing the suggestions by Pallavi. It does work but requires a bit of tweaking in CSS afterwards. The problem with this approach is that the changes will be overwritten when Boss for LearnDash plugin is updated.
December 17, 2015 at 2:47 pm #54646@
AnonymousHi @mln83, @digitalmarketer Sorry for inconvenience
Developers are already working on it to make a clean flow for overwritefor overriding learndash templates in child theme you will need to copy templates/learndash folder to root directory of child theme and add the following function in functions.php
function boss_override_learndash_templates() { return get_stylesheet_directory().'/learndash/'; } add_filter('boss_edu_template_path', 'boss_override_learndash_templates');
at present you will need to bring all files inside the social-learner/learndash from boss-learndash/templates
not just one like lesson.php
after copying all the files, you can edit any one of them inside social-learner/learndash folder
Regards
- The question ‘How to move lesson navigation below Lesson Title?’ is closed to new replies.