Posts

Posts

Posts are entries listed in reverse chronological order on your site. They can be thought of as articles or updates that you share with your readers.

When you select Posts in the dropdown to the right of the Query ID, a panel of clickable options appears so that you can select different filtering parameters for your Posts, such as Posts, Author, Mime Types, Comments, Permissions, Status, Passwords, Order, Pagination, Search, Taxonomy Query, Meta Query, Date Query, Code.

A blue dot will appear to the left of a parameter to let you know you have added a parameter.

Post Type

The different types of content in WordPress are usually referred to as Post Types. This can lead to confusion as Post Types includes all the different types of Wordpress content including Posts, Pages and Media. These are all specific Post Types.

Posts Post Type is dynamic and used in blogs.

Pages Post Type is static , outside the normal blog stream or feed.

Media Post Type contains information about uploaded files.

You can select one or more Post Types.

Filter
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Builder Modal

  6. Select Posts in dropdown

  7. Select Posts (left hand menu)

  8. Find Post Type

  9. Select required content (Posts, Pages, Media)

Exclude Current

Exclude Current can be toggled to exclude the Current Post. By default it is deactivated and the Current post is included.

Exclude/Include Current
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Builder Modal

  6. Select Posts in dropdown

  7. Select Posts (left hand menu)

  8. Toggle the Exclude Current property

Include Posts

Include Posts allows you to include selected posts.

Include
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the block inspector

  3. Navigate to the primary tab

  4. Find Query Editor icon

  5. Click to open Query Builder Modal

  6. Select Posts in dropdown

  7. Select Posts (left hand menu)

  8. Select the Post(s) you wish to Include

Exclude Posts

Exclude Posts allows you to exclude selected posts.

Exclude
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Builder Modal

  6. Select Posts in dropdown

  7. Select Posts (left hand menu)

  8. Select the Post(s) you wish to Exclude

Author

The Author property allows you to set Query filters for Authors such as Author ID, Author's Name, or whether a post has an author or no author.

Filter
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Author in Panel

  8. Select required filter (Author ID, Author's Name, or whether a post has an author or no author)

Mime Types

The Mime Type property (also called media type or content type) allows you to add a post type attachment (audio/ogg, image/png etc).

Input
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Mime Types in panel

  8. Input Attachment Post Type (audio/ogg, image/png etc)

Comments

The Comments property allows you to set a Query filter to sort comments by Amount or Compare.

Amount

The Amount parameter allows you to set a Query filter for the amount of Comments.

Input amount
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Comments in panel

  8. Find Comments Amount

  9. Input value

Compare

The Compare parameter allows you to set a Query filter to Compare comments

Comparator

> Less than

>= Less or equal to

< Greater than

<= Greater than or equal to

LIKE Allows you to search for a part of a comment, such as first name contains John but can also be Johnny, Johnathan, etc.

NOT LIKE Inverse of LIKE, must not contain any part of a comment.

IN Must be in

BETWEEN Must be between

NOT BETWEEN Must not be between

EXISTS Must exist

NOT EXISTS Must not exist

REGEXP

NOT REGEXP

Compare
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Comments in panel

  8. Find Compare

  9. Select operator

Permissions

The Permissions property defines the access to your posts, such as whether a post is readable.

Choose
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Permissions in panel

  8. Find User Capabilities

  9. Select readable

Status

The Status property allows users to set a workflow status for a post. These include: publish, pending, draft, auto-draft, future, private, inherit, trash, any.

Select
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Status in panel

  8. Select required Post Status(publish, pending, draft, auto-draft, future, private, inherit, trash, any)

Passwords

The Passwords property allows you to filter posts: Have/Do not Have Password, or by Password .

Have/Do not Have Password

Posts can be filtered on the basis of whether they have or do not have a password.

Filter
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Passwords in Panel

  8. Find Has Password

  9. Toggle on/off

Password

Posts can be filtered by Password.

Filter
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Passwords in Panel

  8. Find Post Password

  9. Input Password

Order

Order and Order By allow you to choose the order in which you want your posts displayed or using a specific parameter. For this, you can choose by Order or Order By.

Order By

Order By lets you sort your retrieved posts by a specific parameter. By default, this is by published date.

Parameters

None No order.

ID Order by Post ID (Note capitalisation).

Author Order by Author.

Title Order by Title.

Name Order by Post Name (Post Slug).

Post Type Order by Post Type.

Published Date Order by Published Date.

Modified Date Order by last Modified Date.

Parent Order by Post/Page Parent ID.

Random Random Order.

Comment Count Order by number of comments.

Relevance Order by search terms.

Menu Order Order by Page Order.

Meta Value Order by Meta Value.

Numeric Meta Value Order by numeric meta value.

Order By
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Order and Order By in panel

  8. Find Order By dropdown

  9. Select required parameter

Order

Order lets you choose a direction for your retrieved posts (ascending or descending). By default, posts are by descending order.

Order
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Order and Order By in panel

  8. Find Order dropdown

  9. Select direction (descending, ascending)

Pagination

Pagination allows you to choose the number of items you wish to display per page, whether you want any offset and if so how much and whether you want the items to be 'sticky'.

Items per Page

The Items per page property allows you to choose how many Items you wish to display on each page.

Add/Remove
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Pagination in panel

  8. Find Items per Page

  9. Enter value

  10. Click dot to reset

Page

The Page property allows you to choose the number of the page you want to be on.

Add/Remove
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Pagination in panel

  8. Find Page

  9. Enter page number

  10. Click dot to reset

Offset

The Offset property offsets the number of Items you set.

An Offset of 1 will make the second item become the first.

Add/Remove
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Pagination in panel

  8. Find Offset

  9. Enter value

  10. Click dot to reset

Sticky Posts

The Sticky property allows you to include or exclude Sticky Posts.

Toggle
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Click Posts in panel

  7. Open Pagination (left hand menu)

  8. Find Sticky

  9. Toggle to include/exclude

The Search property allows you to search using a keyword.

Search
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Click Posts in dropdown

  7. Open Search in panel

  8. Input keyword to search

Taxonomy Query

The Taxonomy Query property allows you to organise your content using additional taxonomies that you have created.

If you have more than one Taxonomy Queries, you can select an and/or relation.

Add
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Taxonomy Query in panel

  8. Find Relation

  9. Select And/Or

  10. Click "+" to add new Taxonomy Query

Edit Taxonomy Query

The Edit Taxonomy Query allows you to choose the parameters of your Taxonomy Query, including Multiple Taxonomy Query, Include Children, Taxonomy, Terms, Field, Operator and Include Children.

Taxonomies

Multiple Taxonomy Query parameter ensures that all the taxonomies are used in a search and not just the first.

Taxonomy parameter is a way of organising your content and data.

Terms parameter are the items in a taxonomy.

Field parameter is additional information added to your posts as metadata.

Operator parameter is the method used for a search.

Include Children parameter allows you to include or exclude child categories.

Name parameter allows you to change the name of your taxonomy query

Edit
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Taxonomy Query in panel

  8. Find Relation

  9. Select And/Or

  10. Click "+" to add new Taxonomy Query

  11. Click Taxonomy Query Name to edit

Name

To edit the name of a Taxonomy Query, click the name box and input a name.

Multiple Taxonomy Query

The Multiple Taxonomy Query property allows you to use multiple taxonomies in a search and not just the first. The Query builder allows you to build a Tax Query to handle multiple taxonomies.

Toggle on/off
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Taxonomy Query in panel

  8. Toggle Multiple Taxonomy Query

  9. Click "+" to add a Child Relation

  10. Select And/Or

  11. Add new Taxonomy Query

  12. Click name to edit Taxonomy Query

Include Children

The Include Children property allows you to include or exclude child categories.

Toggle
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Taxonomy Query in panel

  8. Find Relation

  9. Select And/Or

  10. Add new Taxonomy Query

  11. Click Name to edit Taxonomy Query

  12. Find Include Children

  13. Toggle to include/exclude

Taxonomy

The Taxonomy property allows you to organise your content and data including: Tags, Navigation Menus, Link Categories, Formats, Themes, Template Part Areas.

Select
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Taxonomy Query in panel

  8. Find Relation

  9. Select And/Or

  10. Add new Taxonomy Query

  11. Click Name to edit Taxonomy Query

  12. Find Taxonomy

  13. Select Taxonomy parameter (Tags, Navigation Menus, Link Categories, Formats, Themes, Template Part Areas)

Terms

The terms property refers to the items in a search, such as: uncategorised, Cwicly, external, grouped, simple, variable, Uncategorised

Select
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Taxonomy Query in panel

  8. Find Relation

  9. Select And/Or

  10. Add new Taxonomy Query

  11. Click Name to edit Taxonomy Query

  12. Find Terms

  13. Select required Terms in dropdown

Field

The terms parameter allows you to use additional information for a query, such as: term_id, name, slug, term_taxonomy_id.

Select
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Taxonomy Query in panel

  8. Find Relation

  9. Select And/Or

  10. Add new Taxonomy Query

  11. Click Name to edit Taxonomy Query

  12. Find Field

  13. Select required Field (term_id, name, slug, term_taxonomy_id)

Operator

The Operator property is the method used for a search, including In, Not In, And, Exists, Not Exists.

Select
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Taxonomy Query in Panel

  8. Find Relation

  9. Select And/Or

  10. Add new Taxonomy Query

  11. Click Name to edit Taxonomy Query

  12. Find Operator

  13. Select Operator (In, Not In, And, Exists, Not Exists.)

Duplicate

The Duplicate icon next to the Taxonomy Query name allows you to copy the Query.

Delete

The Delete icon allows you to delete a Taxonomy Query.

Meta Query

The Meta Query property helps you to filter the results by object metadata, including: Meta Key(Meta Field identifier), Meta Value (Value of Meta Field), Meta Compare, Meta Type, Relation, Inner Meta Query.

Filter
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the primary tab

  4. Find Query Editor icon

  5. Click to open Query Builder Modal

  6. Select Posts in dropdown

  7. Click Meta Query in panel

  8. Find Relation

  9. Select And/Or

  10. Add new Meta Query

  11. Click Name to edit Meta Query

  12. Choose Meta parameter (Meta Key, Meta Value, Meta Compare, Meta Type, Relation, Inner Meta Query.

Meta Key

The Meta Key parameter is used to retrieve a saved value from the database and display it.

Add
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Meta Query in Panel

  8. Find Relation

  9. Select And/Or

  10. Add new Meta Query

  11. Click Name to edit Meta Query

  12. Find Meta Key

  13. Add Key

Meta Value

The Meta Value parameter allows you to get all the posts with a specific custom field value.

Add
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Meta Query in panel

  8. Find Relation

  9. Select And/Or

  10. Add new Meta Query

  11. Click Name to edit Meta Query

  12. Find Meta Value

  13. Add Value

Meta Compare

The Meta Compare parameter allows you to set up a query using a comparator two sets of values, such as: =, != , >, > , >= ,< ,<=, LIKE, NOT LIKE, IN, BETWEEN, EXISTS, NOT EXISTS, REGEXP, NOT REGEXP, RLIKE, NOT RLIKE.

Comparator

> Less than

>= Less or equal to

< Greater than

<= Greater than or equal to

LIKE Allows you to search for a part of a comment, such as first name contains John but can also be Johnny, Johnathan, etc.

NOT LIKE Inverse of LIKE, must not contain any part of a comment.

IN Must be in

BETWEEN Must be between

NOT BETWEEN Must not be between

EXISTS Must exist

NOT EXISTS Must not exist

REGEXP

NOT REGEXP

RLIKE

NOT RLIKE

Compare
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Meta Query in panel

  8. Find Relation

  9. Select And/Or

  10. Add new Meta Query

  11. Click Name to edit Meta Query

  12. Find Meta Compare

  13. Add Comparator (=, != , >, > , >= ,< ,<=, LIKE, NOT LIKE, IN, BETWEEN, EXISTS, NOT EXISTS, REGEXP, NOT REGEXP, RLIKE, NOT RLIKE)

Meta Type

The Meta Type parameter allows you to set up a query using a Meta Type such as: Numeric, Binary, Char (Character), Date, Datetime, Decimal, Signed, Time.

Add
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Meta Query in panel

  8. Find Relation

  9. Select And/Or

  10. Add new Meta Query

  11. Click name to edit Meta Query

  12. Find Meta Type

  13. Add parameter (Numeric, Binary, Char (Character), Date, Datetime, Decimal, Signed, Time)

Meta Relation

The Meta Relation parameter allows to associate extra information stored in independent entities (meta entities) to content entities using an And/Or relation and a single or multiple Inner Query(ies).

Add
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Meta Query in panel

  8. Find Relation

  9. Select And/Or

  10. Add new Meta Query

  11. Click Name to edit Meta Query

  12. Find Meta Relation

  13. Choose Relation (And/or)

  14. Add Inner Meta Query name

Date Query

The Date Query allows you to filter your Posts by Date, such as Year, Month, Week, Day, Hour, Minute, Second, Before a selected date, After a selected date, Compare two or more dates.

The Date Query may be inclusive or not inclusive depending on whether you want to include the current date or not.

Filter
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Date Query in panel

  8. Find Relation

  9. Select And/Or

  10. Add new Date Query

  11. Click Name to edit Date Query

  12. Add Date Query (Year, Month, Week, Day, Hour, Minute, Second, Before, After, Compare)

Toggle Inclusive
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Click Date in panel

  8. Find Relation

  9. Select And/Or

  10. Add new Date Query

  11. Click Name to edit

  12. Find Inclusive

  13. Toggle on/off

Code

The Code property allows you to copy and export the code generated by the Query you have set up.

Copy
  1. Click on the ➕ ​​icon to open the Inserter Panel

  2. Open the Block Inspector

  3. Navigate to the Primary tab

  4. Find Query Editor icon

  5. Click to open Query Editor

  6. Select Posts in dropdown

  7. Open Code

  8. Find Code

  9. Copy required Code (CTRL C)

Last updated