Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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

share|improve this answer
    
Thanks, I looked on the Codex and it said it was deprecated so I wasn't sure. –  Jared Aug 11 '11 at 0:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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