BuddyBoss Home – Web Support Forums Solutions Social Learner How to move lesson navigation below Lesson Title?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Question

    #52895
    @mln83

    I would like to move the Lesson navigation below the Lesson title area.

    Any help is much appreciated.

    Best regards,
    Michael

    Answers

    #52926

    Anonymous
    @

    Hi @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.php

    In 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
    Pallavi

    #52951
    @mln83

    Hi @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.php

    I 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,
    Michael

    #52953

    Anonymous
    @

    Hi @mln83, Please do the same within plugin file see if it’s reflecting and changes is working there.

    Regards
    Pallavi

    #52955
    @mln83

    Hi @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,
    Michael

    #52963

    Anonymous
    @

    Hi @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

    #52969
    @mln83

    Hi @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.

    #53015
    @mln83

    Hi @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,
    Michael

    #54639
    @digitalmarketer

    Did this get resolved. I am having the same issue.

    #54643
    @mln83

    No unfortunately support never got back.

    The only solution I have found is to manually edit:
    /wp-content/plugins/boss-learndash/templates/learndash/lesson.php

    following 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.

    #54646

    Anonymous
    @

    Hi @mln83, @digitalmarketer Sorry for inconvenience
    Developers are already working on it to make a clean flow for overwrite

    for 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

Viewing 11 posts - 1 through 11 (of 11 total)
  • The question ‘How to move lesson navigation below Lesson Title?’ is closed to new replies.