Easiest way:
ob_start();
comments_number();
$data = ob_get_clean();
$data will contain the text.
Related Posts:
- Disable comments on all posts/pages
- Would switching to InnoDB from MyISAM improve performance of comments table?
- Linking to Page Showing Only Comments Without Parent Post
- Comments screen in backend, how to disable email address of commenter for non admins
- How can I limit the number of comments per registered user per day?
- Post Comments using WP REST API v2 in WordPress
- Show content only if member left a comment
- get_comments_number of depth-1 (Level 1) (1 post)
- How can I control the comment counts filtering my CPT replies?
- How to auto-approve internal pingbacks?
- Using filter to add additional fields to comment_form()
- Can I store my custom comment_type into wp_comments table?
- Comments waiting but no comments found
- Programmatically block commenting by restricting view of comment form
- Number of External Links in Comments – Moderation Option
- What is comment_karma?
- How to override function twentyten_comment
- Disqus over the default commenting engine, what are some pros and cons?
- Comments screen in backend, how to disable Quick Edit | Edit | History | Spam | for non admins
- How To Remove The “Click here to cancel reply” Link From The WordPress Comment Form
- Plugin from WordPress.com for comment notification…available? [closed]
- How to add text to comment form #content textarea?
- Get most active users sort by comment count
- Enable Recent Comments widget to display comments on attachment posts
- Change allowed HTML tags for comments
- comments_template not working correcly in custom template files
- How can I highlight admin comments?
- Why are my comments closed?
- On WordPress 4.4, how to get the post id using the comment_post hook
- Is it possible to make wp insert last comment onto another page
- edit_comment capability for subscriber
- Hold comments for moderation only if user is not logged in
- How to add replyToUrl schema.org to WordPress comments?
- Loading post comments after clicking a button
- Follow-up Comments Notification Without a Plug-in
- How to return 404 when called edit-comments.php?
- oEmbed does not work for comments
- Get comments from post and sort by commentmeta value
- Ability to comment on tags that represent a certain “issue”
- Can WordPress comments have titles and taxonomy?
- Do I need to deal with WordPress SQL Injection
- using comments_template() in custom single-portfolio.php
- Comments on homepage (index.php) are duplicated under posts
- Comment Form – E-mail Not Required!
- Get a total count for all comments and display result
- Email notification to an email address other than admin for custom type post comments in wordpress
- Notification if Comment Author Field is left empty. E.g. change input border colour
- List comments received by every posts of an specific author
- How do I reply to comments from admin panel on a tablet PC?
- Disable comments for a user? [closed]
- Filtering the Admin Comments List to Show Only Comments from the Current User?
- Ajax submit comments
- Comment Link from get_comments()?
- How do I automatically insert some text in the comment textbox on submit?
- I cannot view the comments
- if null or int(0) value to 0
- Problem with WordPress Comment
- In wp_list_comments comment dates won’t work?
- Only show own comments in admin panel
- I can’t post comment via REST API
- how to SELECT for the current post id?
- Sending comment notifications to different recipients depending on taxonomy terms
- wp_new_comment requires author url and author email
- Replying to comments
- Custom comment link
- How to display the user’s comment status on the front end
- Where are comments coded when using custom theme?
- unsetting required fields in the comment reply form
- Wrong IP address in comment section
- Problem code and show comments
- Highlight comments made by registered users of the site
- It doesn’t matter if I have more than one comment. get_comments_number still equal to one?
- Simple spam check for valid domain in commenter’s email address
- Allowing WordPress.org/com accounts on a self-hosted install
- How to remove the “comments” bit that appears next to or below the posts
- Sort post comments from newest to oldest in pagination
- Post comments don’t show
- Get all comments associated with a specific page ID (comment_post_ID)
- Update post “A” on comment submition on post “B”
- How do I add custom field to Admin comment form and display
- I would like to count number of comments after 5 days ago
- Comments counter only for Authors Posts
- Pre- Approved Comment Capability
- Delete comments function
- Comment form not working
- Necessary to have a comments.php if there are no comments?
- Comments page id wp_list_comments
- transition_comment_status gets called when untrashing comments
- spacebar is not working in input and textarea
- wp-editor-area textarea disapear on cancel-comment-reply-link click
- Conditionally process comments while ignoring replies
- Required Field for Comment parent only?
- Can I use WP comments for custom tables?
- How do I separate author avatars and comments in 3.4.2?
- writing a plugin, how to disable the comment form altogether?
- How do I convert users who put an email and username for a comment into registered users? [duplicate]
- What filter or action to replace comments or add new comment system
- Function to get a list of all comments on 1 post [closed]
- Auto delete WordPress comments
- Add ACF Quick Edit Columns on Comments