WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
[resolved] Jetpack comments printing incorrect comment depth (6 posts)

  1. Pepe Huerta
    Member
    Posted 1 year ago #

    Hi, Im currently developing a custom theme using threaded comments.

    After activating Jetpack Comments, I get the jetpack comment form, the comments works (get posted), but it always uses depth-1 for comments made in depth 2, 3, etc.

    If I deactivate Jetpack comments, I can use the standard comment form to post nested comments as expected.

    I tried coping the twenty twelve comment function from functions.php just in case I forgot to add something, but it doesn't work either. I'm using comment_form() to call the form in comments.php and I also tried disabling all the plugins without any luck.

    Threaded comments and Jetpack comments both works in twenty twelve.

    Any advice will be appreciated.

    http://wordpress.org/extend/plugins/jetpack/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    Since threading works when switching to Twenty Twelve, the issue must be coming from your theme.

    Could you compare your theme's comment function with Twenty Twelve's, and make sure that your "Reply" link uses the comment_reply_link function?

    You also want to check that you enqueued comment-reply.js, to make sure that the comments are correctly threaded. You can enqueue this file like so:
    wp_enqueue_script( 'comment-reply' );

  3. Pepe Huerta
    Member
    Posted 1 year ago #

    About comment-reply, I'm using it here in functions.php:

    http://pastebin.com/6yQHeNer

    The output:
    <script type='text/javascript' src='http://ongcivico.org/wp-includes/js/comment-reply.min.js?ver=3.5.1'></script>

    About comment_reply_link function, as I wrote in my first post, I copy and pasted twenty twelve's comment function into my own functions.php and didn't work either.

    It's just strange, since the threaded functionality works with the normal comment form, it only breaks with Jetpack Comments activated.

    Now I'm using my custom comment function, which works with the default comment form, but still no luck with jetpack comments. You can try it out here:

    http://ongcivico.org/sin-categoria/hola-mundo/

    Thanks for your time and advice!

  4. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 1 year ago #

    I tested the form and could reproduce the issue.

    I also noticed that your theme's footer is not complete: it misses some elements. It can cause issues with all plugins using the wp_footer() action to hook stylesheets or javascript files to your site.

    Could you check that file, and make sure that the last few lines are as follows:

    <?php wp_footer(); ?>
    </body>
    </html>
  5. Pepe Huerta
    Member
    Posted 1 year ago #

    Yes, the footer is in order:

    http://grab.by/jwEm

    I'm still developing the theme, but the essentials are OK. header sidebar index footer style comments single and functions,

    http://grab.by/jwF0
    Thank you

  6. Pepe Huerta
    Member
    Posted 1 year ago #

    ahh forget about it.. you where in the right track!

    the get_footer call wasn't present in single.php :( Thank you very much for your time, sometimes it takes a fresh pair of eyes to see what's wrong.

    Thank you again!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic