Support » Plugin: Lazy Load for Comments » How to make this plugin load AFTER comment submission form?

  • Hi! I’m very thankful for this plugin.

    I’ve already moved the comments submission form above the comments in my Genesis/Studiopress theme, using this code:

    //* move comment form up
    add_action( 'genesis_before_comments' , 'wps_post_type_check' );
    function wps_post_type_check () {
        if ( is_single() ) {
            if ( have_comments() ) {
                remove_action( 'genesis_comment_form', 'genesis_do_comment_form' );
                add_action( 'genesis_list_comments', 'genesis_do_comment_form' , 5 );
            }
        }
    }

    I’d like to edit the plugin so that the comment form always loads by default, and then the actual comments lazy load upon scrolling. Is that possible? If so, how do I make that happen? Thank you in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, just following up on this, as I’m still very interested in making the plugin load in this matter. Could you please provide some clues on how to make this happen? I’d really appreciate it! Thank you again for the plugin.

    I don’t use Genesis/Studiopress and never have, but in my theme the entire comments.php file is lazy loaded, and that, naturally, is where the form as well as the comments listing code are included. So, to show the comment form with this plugin enabled, I need to add it to my other files before (or after, depending on style choice) the comments_template() WordPress function.

    It seems that Genesis offers lots of hooks/filters and you are trying to use genesis_before_comments. My guess is that is called after comments_template() or similar function in your theme. Have you tried genesis_after_post_content instead? So, basically just changing your add_action line to:
    add_action( 'genesis_after_post_content' , 'wps_post_type_check' );

    If the plugin author checks out this thread, how about adding an apply_filters call in the llc-comments.php file after the button code or even before and after? Something like:
    apply_filters( 'llc_pre_button', '' );
    and
    apply_filters( 'llc_post_button', '' );

    • This reply was modified 2 years, 6 months ago by mojamba.
    • This reply was modified 2 years, 6 months ago by mojamba.

    Thank you so much for offering these suggestions! I tried them, though, and it didn’t work. I’m not sure what the solution is.

    Are there any updates on this? @cookieandkate did you find a way to do it? I am also very interested in this functionality. Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to make this plugin load AFTER comment submission form?’ is closed to new replies.