0

Is there a way to return the comments link instead of echoing it? I've been searching the Codex for a little while now, without being able to find a function that just returns the link and doesn't echo it.

Thanks.

1 Answer 1

0

Use get_comments_link(), it retrieve the link without echoing it.
This is the function that is used by comments_link().

See also: http://codex.wordpress.org/Function_Reference/comments_link

1
  • Thanks, I looked on the Codex and it said it was deprecated so I wasn't sure.
    – Jared
    Commented Aug 11, 2011 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.