Support » Fixing WordPress » Problem with comments_link()

  • Jez

    (@jez)


    I’m trying to use comments_link() to create a link to my comments page.
    In my index.php everything works fine, but if I use wp.php then the link still points towards the index.php comments page.
    The docs say the function has this parameter:
    “file name, in case you want to use a different template for comments (default is the current template)”
    But when I specify a different filename, i.e. comments_link(“wp.php”) it does not make any difference. The link still points to the index.php comments page.
    So… are the docs wrong, or am I stupid? And if the docs are wrong, how can I achieve what I am trying to achieve (i.e. a link to the comments page without changing to the index.php template).
    Thanks for any help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m not sure where you want the Comments link to go to ?
    Is it to a WP file, or a different one ?
    Which build are you using ?

    Okay .. I think I know what you mean… (and I’m really new to this PHP lark myself)
    When you click the Comments Link, you are getting a page that is formatted the same way as index.php – is that it ?
    And you want it to lose that formatting, so you can style it how you want ?

    Anonymous

    This seems to be a known issue, because it mentions on the wiki that parameter doesn’t work. Hopefully the developers will sort it out for 1.1 🙂
    You mention you’re having the same issue with some other calls; could you note that on the same page, next to the relevant tags? Or stick it here and someone else will add it for you.

    Jez

    (@jez)

    The other calls aren’t broken as such, because they don’t take such a parameter. But what I meant was that because they don’t have such a parameter, they are giving me the same problem as the comments_link() link, which is that they link to my default template no matter what template is being used.
    I think that’s right anyway, I just woke up…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem with comments_link()’ is closed to new replies.