Forums

[resolved] Cancel Comment button doesn't work (7 posts)

  1. jonnyplow
    Member
    Posted 1 year ago #

    NOTE: my wp version is actually 3.0.2

    For a theme I'm building:

    I have threaded comments enabled. When I test it live I go to comments section. Add some test comments. Then test the comment REPLY button, which reloads the page with the comment box as the focus and the CANCEL REPLY button showing. But when I try to click the cancel reply button, it doesn't work, and it will only scroll the page back to the comment form.

    So, first, should the page even be reloading when I click reply?
    Second, why would the cancel button not work?

    My code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

  2. jonnyplow
    Member
    Posted 1 year ago #

  3. jonnyplow
    Member
    Posted 1 year ago #

    Anyone have this happen??

  4. jonnyplow
    Member
    Posted 1 year ago #

    anyone????

  5. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    So, first, should the page even be reloading when I click reply?

    No

    Second, why would the cancel button not work?

    Are you enqueing the comment javascript correctly in header.php - just before <?php wp_head(); ?>`?

    <?php if(is_singular()) wp_enqueue_script( 'comment-reply' );?>

    Does your theme use any javascript? If so,have you tried removing it?

  6. jonnyplow
    Member
    Posted 1 year ago #

    Genius Esmi! I used

    <?php
    if ( is_singular() && get_option( 'thread_comments' ) )
    wp_enqueue_script( 'comment-reply' );
    wp_head();
    ?>

    THANKS A TON!

  7. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    No problem. Just sorry it took so long for you to get a response.

Topic Closed

This topic has been closed to new replies.

About this Topic