CommentCounts
Returns the total number of comments for WordPress posts, including counts by status such as approved, pending, and spam.
Table Specific Information
SELECT
The server uses the WordPress API to process some of the filters.
- PostId supports the '=' comparison.
The server processes other filters client-side within the server.
For example, the following queries are processed server side.
SELECT * FROM CommentCounts WHERE PostId = 21
Columns
| Name | Type | References | Description |
| All | Int | Represents the total count of all comments on the post, regardless of status such as, approved, pending, spam, or trash. | |
| Approved | Int | The number of approved comments for the post. | |
| Pending | Int | The number of comments on the post that are awaiting moderation. | |
| Trash | Int | The number of comments for the post that have been moved to the trash. | |
| Spam | Int | The number of comments on the post that are marked as spam. | |
| PostTrashed | Int | Indicates whether the associated post has been moved to the trash in WordPress. | |
| TotalComments | Int | The total number of comments associated with the post across all statuses. |
Pseudo-Columns
Pseudo-column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the data returned by the operation.
| Name | Type | Description | |
| PostId | Int | The unique identifier of the post for which the comment counts are summarized. |