Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1172320

    I am using Learndash with Enfold. I have successfully used Learndash with Enfold on several sites now, but have not needed to integrate comments in the past. This current site that I am working on absolutely requires that comments and discussion are featured on lessons, topics and courses. When I switch to the base theme, TwentyTwenty, comments show up on lessons, etc, with no issue. When I am using Enfold (I tried with my child theme as well as with the base Enfold theme), comments do not work.

    I tried contacting Learndash support and as the issue is resolved when I switch themes, they are stating that it is a problem within Enfold that is causing the issue and I need theme developer support to correct this.

    I am including site login details below.

    #1172593

    Hey akn7162,
    Thanks for the login, I see that your lessons are built with the Advanced Layout Builder, when using the Advanced Layout Builder comments do not show on a post, to show comments on a post you would need to use the comment element.
    You can try using the WordPress editor to create a lesson to see if the comment will show.
    You can also try using this shortcode on a lesson built with the Advanced Layout Builder to see if that helps:

    [av_comments_list av-desktop-hide='' av-medium-hide='' av-small-hide='' av-mini-hide='' av_uid='av-79s2f5'] 

    Also try adding a manual comment in the backend to see if that forces them to show.

    Best regards,
    Mike

    #1173648

    I already tried to add a single comment on a post to see if that forced them to display, and it did not.

    The comment element does work, but it shows above the “Mark Complete” button and I absolutely need it to show below that element, which I cannot move or place in the builder as a shortcode (tried to see if that was possible already too). If I use the builder element for comments and place them above the Mark Complete button, a user will have to scroll through every comment to get to the bottom of the post to move on to the next lesson. From a UX perspective that’s simply awful. Is there a way to get only 3 comments to show up and have the rest be expandable with the comment builder element maybe? I’m trying to think of alternative solutions for this. From their last course (which was built on Kajabi), I saw 20-30 comments per lesson, it’s just not reasonable to expect someone to scroll through that many on each lesson to get to the Mark Complete button to move forward.

    Also, the only reason I used the advanced builder vs the standard was because the sidebar wasn’t displaying as a sidebar (it was displaying full-width at the bottom of the page instead), so I changed to using the builder and using a widget element for the sidebar. It’s seemed like every time I fix one problem with Enfold and Learndash together, I find a new one.

    I’ve honestly spent 10-15 hours trying to figure out a way around this already and purchased a new support license on my own account just to try to get some developer theme support on this. Comments below Mark Complete work just fine on other themes and I really really really don’t want to have to scrap all the time I’ve spent on this project already to build it on a new theme because this one little thing is not possible within Enfold. Is there any other help you can give me to resolve this?

    #1173907

    Hi,
    Can you include a link directly to a page where the comment shows above the Mark Complete button, I tried to find one but couldn’t.
    I may be able to move the element with javascript. Also if you can point to an example where there are more than 3 comments so I can see if we can collapse them?

    Best regards,
    Mike

    #1174603

    Mike,

    I removed the comments because they only show as part of the builder, which automatically goes above the Mark Complete button like you said. I want them to display automatically on the post like they do in other themes with this plugin. I didn’t realize Enfold had this limitation.

    I added them back in the builder on this lesson (feel free to add and remove them from the builder on any lesson post type for testing purposes if that helps) so that you can see them, but seeing them or not shouldn’t solve the problem of them appearing above or below the Mark Complete button. I’m looking to have them included at the very bottom of a post as is naturally done on post types in WordPress, so removing the override that places the builder above it by default and having them included automatically instead of in the builder.

    I also added 5 comments manually to this post so that we can see about collapsing them to 3 posts though I would greatly prefer if the post types would automatically display comments even with the builder as on other themes. Do you see how a user would have to scroll through all of the comments to move on with the way this is working when using the builder component? It’s not good for UX at all. Test page URL below.

    #1174935

    Hi,
    Thank you, to move the comments after the Mark Complete button Try adding this code to the end of your functions.php file in Appearance > Editor:

    function move_comments(){
      ?>
      <script>
    (function($){
      $(document).ready(function(){
      $('.av-buildercomment' ).insertAfter( '.ld-content-actions' );
      });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'move_comments');

    To only show the first 3 comments and add a link so the rest can be shown/toggled, Try adding this code to the end of your functions.php file in Appearance > Editor:

    function toggle_comments(){
      ?>
      <script>(function($){
      $(document).ready(function(){ 
          $('#comments').find('li:nth-child(n+4)').hide();
          $('<a href="#comments" class="ld-primary-color comment-toggle">View More Comments</a>' ).insertAfter( '#comments li:nth-child(3)' );
           $('#comments .comment-toggle').click(function () {
               $('#comments li:nth-child(n+4)').toggle(); 
               $(this).text($(this).text() == 'View More Comments' ? 'View Less Comments' : 'View More Comments');
           
           });  
        });  
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'toggle_comments');

    Best regards,
    Mike

    #1175104

    This did the trick, thank you so much for your help!!

    #1175118

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Enfold Learndash Comment Theme Conflict’ is closed to new replies.