Comments
Returns comments from WordPress posts, including author details, content, and status information.
Table Specific Information
SELECT
The add-in uses the WordPress API to process some of the filters. Note: Status with unapproved or trash as value will not populate using simple SELECT, respective CommentId will be required to populate the values for those Status.
- Id supports the '=' comparison.
- Status supports the '=' comparison.
- Type supports the '=' comparison.
The add-in processes other filters client-side within the add-in.
For example, the following queries are processed server side.
SELECT * FROM Comments
SELECT * FROM Comments WHERE ID=21
SELECT * FROM Comments WHERE status='approved'
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, pending, or spam. The allowed values are approved, spam, unapproved, trash. | |
| Type | String | True |
Specifies the type of comment, such as a standard comment, trackback, or pingback. | |
| 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 |
he 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 commen. | |
| 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. |