WordPress.org

Forums

Removing Moving Form in Comment-Reply.js (4 posts)

  1. cpoteet
    Member
    Posted 5 years ago #

    I am currently attempting to use the threaded comments and in that the "click to reply" functionality. However, I'd like to remove the part that moves the comment form underneath the comment you're replying to. I just want the feature of recognizing which comment is being replied to.

    Here is the JS that is included. I'd like to neuter the moving of the comment form but keep the page from posting back when clicking "reply".

    http://pastie.org/837866

  2. cpoteet
    Member
    Posted 5 years ago #

    Remove this line

    comm.parentNode.insertBefore(respond, comm.nextSibling);

    Remember this is the dev and not production JS I linked to.

  3. maxemil
    Member
    Posted 4 years ago #

    Thanks, I had this issue too :)

    in header.php you can then substitute the included comment-reply.js with your own: (something like this)

    if ( is_singular() && get_option( 'thread_comments' ) )
    {
      wp_deregister_script( 'comment-reply' );
      wp_enqueue_script('comment-reply', get_bloginfo('stylesheet_directory').'/js/comment-reply.dev.js');
    };
  4. intenseblog
    Member
    Posted 4 years ago #

    You don't need the feature of recognizing which comment is being replied to make nested comment be enabled.
    In your case, just remove the call back to comment-reply.js in your header.php template file.
    [sig moderated as per the Forum Rules]

Topic Closed

This topic has been closed to new replies.

About this Topic