1. Home
  2. Docs
  3. Divi Query Builder
  4. Content Settings
  5. Query Types (Posts, Terms, Users)

Query Types (Posts, Terms, Users)

In this section of the module setting you can select the query type. Currently, supported query types are:

 

  • Post, pages, media & any post type for any query that will retrieve data from post base type like post, pages, project, products, etc…
  • Categories, tags & any taxonomy terms for any query that will retrieve data from taxonomy terms like categories, tags, and custom taxonomy terms from any post type.
  • Users to retrieve data from your site users.
  • Current singular or archive page query to get post data from the main query of your current page or archive. To use it on archive pages place the module on the template you need within the Divi Theme Builder.

Post query arguments

  • Results Number:  Maximum number of posts to show.
  • Offset Number:  Number of posts to displace or pass over.
  • Order: Designates the ascending or descending order of the “Order By” argument.
  • Order By: Sort retrieved posts by parameter. See WP documentation.
  • Post Type: Retrieves posts by post types. See WP documentation. At least one post type is required. If you want to query Media (attachments) post type make sure to change the Post Status to include inherit status.
  • Post Status: Retrieves posts by post status. See WP documentation.
  • Exclude Current Post: Remove current post from query results. This will work only on singular post pages.

Terms query arguments

  • Number:  Maximum number of terms to show.
  • Offset: Number of terms to displace or pass over.
  • Order: Designates the ascending or descending order of the “Order By” argument.
  • Order By: Sort retrieved terms by parameter. See WP documentation.
  • Archive Terms: Activate this option to query children or siblings’ terms of the current archive term. Select Show “Children Or Siblings” to show children or siblings terms of a term without children.
  • Children terms: Levels of children terms to show, select between show first levels useful for creating a taxonomy terms navigation or show all children levels.
  • Taxonomy: Select the taxonomies to query terms of.
  • Terms: Select the terms you want to include or exclude. Leave empty to query of terms of the taxonomies selected on the option before.
  • Include or Exclude Terms: Choose to include or exclude the terms you have selected.
  • Hide Empty: Whether to hide terms not assigned to any posts.

User query arguments

  • Number:  Maximum number of users to show.
  • Offset: Number of users to displace or pass over.
  • Order: Designates the ascending or descending order of the “Order By” argument.
  • Order By: Sort retrieved users by parameter. See WP documentation.
  • User Roles: Retrieve users by role.
  • Include or Exclude Role: Choose to include or exclude users from the roles you have selected.

Current page arguments

There are no arguments for the current singular or archive page query option. This option is designed for the module to get its data from the current main WordPress query. Whether the module is placed on a singular page to show the page/post data,  on an author/date/category archive page, or on a search/404 results page to show a grid of related posts.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

How can we help?