Back to contents

JetEngine: Query Builder Users Query Type

This overview will describe all the Query Builder’s Users Query type settings, which make a part of the JetEngine plugin.

It can be useful to display a list of users in various places on your website, such as team member lists. You can certainly create a Listing template for users and then display it via the Listing Grid. However, the Users Query settings section of Listing Grid is not very flexible. Users Query type of Query Builder gives you much more options and allows you to query the list with higher precision.

Let’s dive deeper into its settings.

User Role

User Query user roles settings
  • Role. In this drop-down menu, you will find all the user roles that exist on your website. You can select as many of them as you want. The user that is assigned to all of that roles will be added to the list;
  • Role In. Here you also can choose several user roles. The users that are assigned to at least one of the roles you choose will be added to the list;
  • Role Not In. The users that are assigned to at least one of the roles you choose here will be excluded from the list.

Include/Exclude

User Query include/exclude settings
  • Include. Type the IDs of users you want to add to the list here;
  • Exclude. And here, you can type the IDs of users you don’t want to see in the list.

Misc

User Query misc settings
  • Search. If you want to display only users having a certain value in one of their default meta fields (like Login, Email, or URL), you can type that value here. Afterward, choose the default meta field in the Search Columns drop-down menu. The typed-in value will be searched in the fields you have chosen in the Search Columns list. Only those users who have that value in the chosen fields will be added to the list. You can also set the searching rules here using the “*” symbol:
    • “*” before the value – the system will search the values that start with the symbols you type. For example, if you insert “*a” to the bar, all the users that have a value that starts with “a” in the field you have chosen will be added to the list;
    • “*” after the value – the system will search the values that end with the symbols you type. For example, if you insert “a*” to the bar, all the users that have a value that ends with “a” in the field you have chosen will be added to the list;
    • “*” before and after the value – the system will search the values that contain symbols you type. For example, if you insert “*a*” to the bar, all the users that have a value that contains “a” in the field you have chosen will be added to the list;
  • Search Columns. In this drop-down menu, you will find all the meta fields that are attached to the users. Choose the one in which to search for the value of the Search bar;
  • Number. In this bar, you can define the number of users that will be added to the list;
  • Offset. Here you can type the number of first posts that won’t be added to the list;
  • Paged. This feature works like there’s pagination added to the list. You can type a number of the page, and all the users that would’ve been shown on that page will be added to the list;
  • Order By. Choose by what value to order the users in the list;
  • Order. Select how the users will be ordered – from lowest to highest values or vice versa.

Meta Query

This tab allows you to add users to the list according to the values of their meta fields. You set a value in the Value text area, and then the data from the meta field that you choose in the Field key/name bar is compared to that value. If they match, the user is added to the list. The conditions the value of the meta field has to meet are called Meta Query Clause. You can add as many Meta Clauses as you want by clicking on the “Add New” button.

User Query meta query settings
  • Field key/name. Enter the name of the meta field that is attached to the Post Type you’ve chosen in the General settings tab. You can use dynamic tags in this bar;
  • Value. The value you set here will be compared to the value of the meta field you have chosen in the Field key/name bar;
  • Compare. Here you can choose how the values will be compared:
    • Equal – displays posts having an equal value;
    • Not Equal – shows posts that don’t have an equal value;
    • Greater than – shows posts that have a greater value. It works with numeric values only;
    • Greater or equal – displays posts that have a greater or equal value. It also works only for numeric values;
    • Less than – shows posts that have a lesser value. For numeric values only;
    • Less or equal – displays posts that have a lesser or equal numeric value;
    • Like – shows posts that have the value you set in the Value field mentioned in the content;
    • Not like – displays only the posts that don’t have the value you’ve set in the Value field mentioned in the content;
    • In the list – after you add several values to the Value field, it shows the posts that have at least one of them in their content;
    • Not in the list – displays posts that have any values except the ones you typed into the Value field;
    • Between – displays posts that contain the value between two, which are set in the Value field; 
    • Not between – shows all the posts except the ones that contain a value that matches the set interval;
    • Exist – shows all the posts that contain the Key. You don’t need to set the Value in this case;
    • Not exist – displays all the posts that don’t contain the Key. You don’t need to set the Value either;
  • Type. This drop-down allows you to specify what type of data is stored in the chosen meta field:
    • Char – alphabetic data that is not sensitive to case;
    • Numeric – whole numbers only;
    • Date – date values;
    • Datetime – date and time;
    • Decimal – fraction number data;
    • Time – time values;
    • Binary – data that is sensitive to case;
    • Signed – whole numbers, both positive and negative;
    • Unsigned – whole numbers, only positive.

Date Query

User Query date query settings
  • Year. Users that were created or modified in this year will be added to the list;
  • Month. Users that were created or modified in this month will be added to the list;
  • Day. Users that were created or modified on this day will be added to the list;
  • After. Users that were created or modified after the date you enter into this bar will be added to the list;
  • Before. Type the date here, and all users that were created or modified before it will be added to the list;
  • Inclusive. If you enable this toggle, the date you type in the After or Before bars will be included in the range;
  • Compare. Here you can choose how the date you added to Year, Month, and Day bars will be compared to the date of user creation or modification;
  • Column. You can choose which date to take in this drop-down menu – the date of creation or modification.

That is all for the Users Query type. Create a precise posts list and display it wherever you want!