How do I create a link to comment location on a wordpress blog w/o using full URL?

Discussion in 'WordPress' started by Chris Guthrie, Jan 19, 2009.

  1. #1
    Ok so basically I have a post and I want to directly link down to the comments field. I found that this works:

    http://www.mywordpressblog.com/mywordpresspost/#comment

    But how can I do it so that I can link down to the comment portion of the blog post without typing out the entire URL?

    I already tried:

    <a href="#comment">Comment Here</a>
    PHP:
    This works inside a post but not with this other plugin I'm using...

    So my main question is:

    Is there a way to use some sort of wordpress code that includes the URL of the site and the title of the blog post without having to do it manual? That way I can do something like:

    Wordpresscode/#comment

    Thanks in advance!!!
     
    Chris Guthrie, Jan 19, 2009 IP
  2. Big0ne

    Big0ne Well-Known Member

    Messages:
    2,615
    Likes Received:
    81
    Best Answers:
    0
    Trophy Points:
    165
    #2
    You might try:

    <a href="<?php comments_link(); ?>">Your text to comment</a>
    PHP:
     
    Big0ne, Jan 19, 2009 IP
  3. Chris Guthrie

    Chris Guthrie Active Member

    Messages:
    249
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Hmm that didn't seem to work...
     
    Chris Guthrie, Jan 26, 2009 IP