CData Python Connector for WordPress

Build 26.0.9770

Comments

Returns comments from WordPress posts, including author details, content, and status information.

Table-Specific Information

SELECT

The connector uses the WordPress API to process the following filters server-side. Other filters are processed client-side within the connector.

  • ID supports the = operator.
  • Status supports the = operator.
  • Type supports the = operator.
  • Date supports the <, > operators.
For example, the following queries are processed server-side.
SELECT * FROM Comments
SELECT * FROM Comments WHERE ID = '21'
SELECT * FROM Comments WHERE Status = 'approved'
Note: Comments with a Status of 'unapproved' or 'trash' will not be returned by a simple SELECT. To populate these results, include the respective Comment ID in your query.

INSERT

To insert a comment, the following column is required: PostID.

INSERT INTO Comments (Content, Status, PostID) VALUES ('This is an example', 'approved', 21)

UPDATE

To update a comment, you must specify the following column: ID.

UPDATE Comments SET  Content= 'Test Comment', Status = 'approved', AuthorEmail = '[email protected]' WHERE ID = '21'

DELETE

To delete a comment, you must specify the following column: ID.

DELETE FROM Comments WHERE ID = '21'

Columns

Name Type ReadOnly References Description
ID [KEY] Int True

The unique identifier for the comment object in WordPress

Content String False

The text content of the comment submitted by the author.

Status String False

The approval status of the comment, such as approved, spam, unapproved, trash, and all.

The allowed values are approved, spam, unapproved, trash, all.

Type String True

Specifies the type of comment, such as a standard comment, trackback, or pingback.

The allowed values are any, comment, trackback, pingback, pings.

URL String True

The website URL associated with the comment or its author.

Date Datetime False

The date and time when the comment was posted in WordPress.

ParentID Int True

The unique identifier of the parent comment, set to 0 for top-level comments.

ParentLink String True

The URL linking directly to the parent comment in WordPress.

ParentType String True

The type of object that the parent comment is associated with, such as another comment or a post.

PostID Int False

The list of post identifiers associated with the comment in WordPress.

PostLink String True

The URL linking to the post or page where the comment was made in WordPress.

PostTitle String True

The title of the post or page associated with the comment.

PostType String True

The type of post associated with the comment, such as a post, page, or custom post type.

ShortURL String True

The shortened URL that links directly to the comment in WordPress.

AuthorAvatarURL String True

Specifies the URL of the avatar image representing the comment's author in WordPress.

AuthorEmail String False

The email address of the user who authored the comment.

AuthorFirstName String True

Specifies the first name of the WordPress user who submitted the comment.

AuthorID Int True

Specifies the unique identifier assigned to the WordPress user who created the comment.

AuthorIpAddress String True

Records the IP address used by the author when posting the comment to WordPress.

AuthorLastName String True

Specifies the last name of the WordPress user who submitted the comment.

AuthorLogin String True

Specifies the WordPress username used by the author who submitted the comment.

AuthorName String False

The display name of the user who authored the comment in WordPress.

AuthorNiceName String True

The URL-friendly version of the author's display name, used in WordPress links or slugs.

AuthorProfileURL String True

Provides the link to the comment author's public WordPress profile or user page.

AuthorSiteVisible Bool True

Indicates whether the author's site or profile is publicly visible in WordPress.

AuthorURL String False

Specifies the website URL submitted by the author when posting the comment.

RawContent String True

Contains the raw text of the comment before any HTML rendering, formatting, or sanitization is applied.

CanModerate Bool True

Specifies whether the logged-in user can perform moderation actions on the comment, such as approve, edit, or delete.

ILike Bool True

Indicates whether the current user has liked the comment.

IReplied Bool True

Indicates whether the current user has replied to the comment.

LikeCount Int True

Displays the total count of likes or positive reactions associated with the comment in WordPress.

MetaAggregate String True

Aggregated metadata for the comment returned by the WordPress API.

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