Pages
Create, update, delete, and query Wordpress Pages.
Table Specific Information
Select
The add-in uses the WordPress API to process supported filters. The add-in processes other filters client-side within the add-in.
For example, the following queries are processed server side.
SELECT * FROM Pages WHERE Id IN (1, 2)
SELECT * FROM Pages WHERE Author IN ('1', '23')
SELECT * FROM Pages WHERE Parent IN (0, 2)
SELECT * FROM Pages WHERE Status = 'Publish'
SELECT * FROM Pages WHERE MenuOrder = 1
SELECT * FROM Pages WHERE Date > '2018-02-02T02:02:23'
SELECT * FROM Pages WHERE Date < '2018-02-02T02:02:23'
SELECT * FROM Pages ORDER BY Id
Also, ordering by Author, Title, Date, Modified, Parent, MenuOrder, is handled by the WordPress API.
Insert and Update
To insert a page, it's enough to specify one of the fields below:
INSERT INTO Pages (Title, Content, Status) VALUES ('A title', 'Some content here', 'publish')
To update a page you must specify the following column: Id.
UPDATE Pages SET Status = 'draft', Content = 'Updated content', Title = 'Updated title' WHERE Id = '12345'
Other fields that you can use on INSERT and UPDATE queries are:
Date, DateGMT, Status, Parent, Title, Content, Author, MediaId, CommentStatus, PingStatus, and MenuOrder.
Delete
To delete a page you must specify the following column: Id.
DELETE FROM Pages WHERE Id = '12345'
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | Integer | True |
The unique identifier of the page in WordPress. | |
| Author | Integer | False |
The unique identifier of the user who created or owns the page. | |
| Title | String | False |
The title of the WordPress page, as displayed in listings or navigation menus. | |
| Date | Datetime | False |
The date and time when the page was published, recorded in the site's local timezone. | |
| DateGMT | Datetime | False |
The date and time when the page was published, recorded in Greenwich Mean Time (GMT). | |
| Link | String | True |
The permalink URL for viewing the published page on the WordPress site. | |
| Modified | Datetime | True |
The date and time when the page was last updated, recorded in the site's local timezone. | |
| ModifiedGMT | Datetime | True |
The date and time when the page was last updated, recorded in GMT. | |
| Status | String | False |
Indicates the current publication status of the page, such as publish, future, draft, pending, or private. The allowed values are publish, future, draft, pending, private. | |
| Type | String | True |
Specifies the content type of the object, which for pages is typically 'page'. | |
| Parent | Integer | False |
The unique identifier of the parent page, if this page is part of a hierarchy. | |
| Content | String | False |
The main body content of the WordPress page. | |
| FeaturedMediaId | Integer | False |
The unique identifier of the media item, such as an image, is set as the featured image for the page. | |
| CommentStatus | String | False |
Indicates whether visitors can post comments on the page. | |
| PingStatus | String | False |
Specifies whether the page can receive pingbacks or trackbacks from other sites. | |
| MenuOrder | Integer | False |
Defines the display order of the page relative to other pages with the same parent. |