Comments (tag)
| add_comment_meta() | Adds metadata (custom field) for the specified comment. |
| clean_comment_cache() | Deletes the object cache of the specified comment. |
| comment_link() | Outputs the comment link (URL). |
| comments_template() | Loads the comments template file on the post page: /comments.php from the theme folder. |
| get_comment_author() | Gets the name of the comment author. If the "author name" (comment_author) field is empty, the function will return: "Anonymous" ( |
| get_comment_author_link() | Gets the HTML link (<a>) to the author's site of the current comment. The anchor of the link will be the author's name. If the author did not specify their site when commenting, the function will return just the author's name, without a link. |
| get_comment_author_url() | Returns the URL of the comment author (usually this is the commentator's website). Returns the URL, not the HTML tag <a>. Used within the comments loop. If the comment author does not have a link specified, it will return an empty string. |
| get_comment_excerpt() | Gets a trimmed version of the current or specified comment (maximum 20 words). |
| get_comment_link() | Gets a link to the specified comment. The link is generated considering the hierarchy. The link is returned with a hash at the end #comment-23. |
| get_comment_pages_count() | Counts the number of comment pages for a post (how many pages comments are split into). |
| get_comments_link() | Gets the link (URL) to all comments for the current post. |
| get_comments_number_text() | Gets the localized label for the number of comments on a post. Notifications and pings are included in the count. For use within the WordPress Loop. |
| get_comments_pagenum_link() | Gets the link to the specified comment pagination page of the post. |
| get_next_comments_link() | Gets a link (A tag) to the next comments page. Should be used on the post page. |
| get_the_comments_navigation() | Gets links to the previous/next comment pages, if such links exist. Used on post pages in the comments block. |
| get_the_comments_pagination() | Gets the pagination links for comments: a list of links to the next and previous pages of comments for the post. |
| have_comments() | Checks if there are comments to display on the current post page. Conditional tag. |
| the_comments_navigation() | Outputs a navigation block for previous/next comments of a post, if they exist. |
| wp_allow_comment() | Checks whether the comment can be published based on the provided comment data or if it needs to be sent for review or marked as spam. |
| WP_Comment_Query{} | Selects comments from the database based on the passed parameters. Based on this class, the function get_comments() works. |
| wp_spam_comment() | Moves the specified comment to Spam (marks the comment as spam). |