0

How can get the comment link by using comment id?

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

2

You can use the get_comment_link().

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

$ wp shell
wp> echo get_comment_link( 4 );
https://example.com/2018/04/12/hello-world/comment-page-1/#comment-4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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