How can get the comment link by using comment id?

I trying to search on google but I can't find anything useful.

1 Answer 1


You can use the get_comment_link().

Here's an example from the wp-cli shell:

$ wp shell
wp> echo get_comment_link( 4 );

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.