CData Python Connector for WordPress

Build 26.0.9770

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 connector uses the WordPress API to process the following filter server-side. Other filters are processed client-side within the connector.

  • PostId supports the = operator.
For example, the following query is 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.

Pseudocolumns

Pseudocolumn fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.

Name Type Description
PostId Int The unique identifier of the post for which the comment counts are summarized.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 26.0.9770