They are pretty much the same. You really can’t say one is better. One has a specific and the other one a more general purpose – that is it. Personally I tend to go with the specific ones, but that is only a personal preference. In summary, just chose which one you want to use.
Addition from @TheDeadMedic
(…) the latter also uses the filter
get_comments_number
, which some plugins like Disqus might use to intercept the value. With WordPress, the general consensus is: if a function exists for a specific purpose, use it, even if there are “other ways” to do it.
Related Posts:
- Why do I get comment spam even with Akismet and Captcha?
- What tools are available for managing/writing to WordPress? [closed]
- comment_post_ID 0 (cannot remove from dashboard)
- Using WordPress’ WYSIWYG for comments
- How to remove comment spam in WordPress
- How is comment spam received without a comments form?
- Does a reply to a wordpress comment notify the author of the comment?
- Link name in comments to Author page? Comment Author Meta in Comments?
- Showing comments only to same custom user role
- Linking comments from registered users to their profile pages
- Can I change what fields are displayed in the Comments form?
- How to enable reply on most-deeply-nested comments?
- Top Commenters: exclude admin
- Comments to Custom Post Type
- Wrong gravatar showing up?
- Get Comments: Direct link to specific comment + post title
- How to make comment text field un-required?
- How can I show comments in random order?
- Is there any way to override “break comments into pages” and “close comments for old posts” on certain posts, but not on others?
- migrate comments from old database to new database
- Toggle nested comments
- Comments Pagination as an unordered list
- How to get comments from multiple post type?
- Check the Comment in Reply or Normal State
- Is it possible to make wp insert last comment onto another page
- How to allow only Admins or Logged In Users to post links in comments?
- wp_insert_comment error. puzzled by date value
- Private replies for comments
- Show last n comments
- Threaded commenting: how to show threads by last active first?
- edit_comment capability for subscriber
- Hold comments for moderation only if user is not logged in
- How to add attributes to the comment form tag?
- How to add replyToUrl schema.org to WordPress comments?
- Get comments from post and sort by commentmeta value
- Yoast makes comment_reply_link function output plain link to comment instead of reply link
- Problems with comments callback (Argument #1 is not an array?)
- Can WordPress comments have titles and taxonomy?
- Do I need to deal with WordPress SQL Injection
- Same email for all comments
- Comments system doesn’t like International domains
- Comments on homepage (index.php) are duplicated under posts
- Email notification to an email address other than admin for custom type post comments in wordpress
- How do I reply to comments from admin panel on a tablet PC?
- Disable comments for a user? [closed]
- Polls with respective comments?
- Why does akismet prevent jetpack comments from appearing in my moderation queue? [closed]
- Filtering the Admin Comments List to Show Only Comments from the Current User?
- Comment Link from get_comments()?
- if null or int(0) value to 0
- Problem with WordPress Comment
- Only show own comments in admin panel
- Where are comment ratings stored?
- Comments change the template name
- I can’t post comment via REST API
- how to SELECT for the current post id?
- WordPress scruity issue – Totally disable all comments by CSS — secure enough?
- Sending comment notifications to different recipients depending on taxonomy terms
- wp_new_comment requires author url and author email
- How to display the user’s comment status on the front end
- Exclude the word comment from being referenced
- How to open up comments to all visitors
- What is the earliest hook comment meta can be saved?
- Get Comment Author ID on the fly while posting
- Is this a wordpress bug? get_comment_link auto shoots when user visits his dashboard
- Comment as post – understanding wp_list_comments
- Comments and pingbacks issues
- Cannot unapprove a WordPress comment
- Crossposting from WP to Blogger with comments
- How to load new posts from wordpress db into wordpress homepage without refreshing the site?
- how show attachment image in comments query
- REST API : Get post title with comment
- Automatically register users with comments
- Comments only displaying when logged in
- Same comment section on every page
- Comment area visible but comments not being saved
- Force to show all fields in comment forms to the logged-in users
- Unable to view comments on my website
- How to make comment reply available only for login members of a certain user roles only?
- Using WordPress core pop-up comment function, doesn’t popup, maybe an elementor issue
- How do i add comment fields in my page in WordPress
- twenty seventeen theme: comments UI not visible
- where can I find the missing comments in my wordpress dashboard?
- Comments editor not rendering   and tag
- How to call out the date of user’s first comment?
- Trying to get property of non-object notices in comment-template.php
- Disqus comments only show up on newest post
- How do you remove the ability for a user to make a comment or post on a page?
- wp_trash_post retrashes already trashed comments?
- How to maintain changes to comment-template.php
- Return comments_link() instead of echoing it
- just show the field comment by clicking button
- If paginated comments don’t span to a second page, how do I hide the div wrapper?
- wp_list_comments() only returns when user is loged in
- Numbering only parent comments
- Is there a way to implement a commenting system such as that on medium or sitepoint in WP?
- How to disable comments on new blog post, but allow on new products?
- Customize the new comment notifications sent to the post author after the comment is approved
- Get approved comments or comments that the author is me
- Show/Hide comments