• Resolved toasticuss

    (@toasticuss)


    Hello,

    I’ve setup a simple single post theme, on the post I want to change where the comment link URL takes a user. Right now on the theme it takes them to the #comments ID which is the top of the comment box.

    I want to change this URL to take the user directly to the comment reply box instead of the first comment.

    This is the theme I’m customizing – http://theme.wordpress.com/themes/singl/

    I’ve looked all over the comments.php file but I can’t find where it’s pulling this ‘#comments’ ID from, I want it to link to the #respond ID instead.

    Let me know if you need me to post any code or samples. Using a comment popup box work too but I can’t find the comment_popup template anywhere.

    Does anyone have any ideas on this?

    Thank you.

Viewing 1 replies (of 1 total)
  • Thread Starter toasticuss

    (@toasticuss)

    In case anyone finds this post – I changed the comment code to the ID like this –

    <?php
    if ( comments_open() ) :
      echo '<p>';
      comments_popup_link( 'No comments yet', '<a href="#respond">Leave a comment</a>', '<a href="#respond">Leave a comment</a>', 'comments-link', 'Comments are off for this post');
      echo '</p>';
    endif;
    ?>

    Where #respond is the comment box.

Viewing 1 replies (of 1 total)

The topic ‘Changing the HREF when leaving a comment?’ is closed to new replies.