Every Unlimited Elements widget that shows a list of posts, such as the Post Grid and the Loop Builder widgets, has a posts query section. In the Loop widgets it is called Items Posts Query. In this section, you choose which posts the widget shows and in which order.
The screenshots in this article are from the Loop Grid widget. Some settings show only after you choose a related option, for example a Posts Source or an Include By rule.
Posts Source
Posts Source
Custom Posts
Current Query Posts
Related Posts
Manual Selection
Post Types
Choose the post types to show, for example posts, pages, products or a custom post type. You can choose more than one post type. This setting is shown for Custom Posts.
Include By
Include By adds rules that choose which posts to show. You can add more than one rule. Each rule shows its own settings:
Include Sticky Posts and Get Only Sticky Posts
Author
Date
Post Parent
Post Meta
Current Page Terms
Most Viewed
IDs from PHP function
IDs from Post Meta
Post IDs from Dynamic Field
Terms from Dynamic Field, Terms from Current Post Meta, Terms from Current User Meta, Terms Free Selection
Current Query as a Base
Include By Date
Published After Date and Published Before Date
Date by Meta Field and Date by Meta Field - Format
Include By Terms
Include By Terms
Include By Terms Relation
Include Terms Children
Exclude By
Exclude By adds rules that remove posts from the list. Each rule shows its own settings:
Terms
Current Post
Specific Posts
Author
Post Without Featured Image
Posts with Current Category and Posts With Current Tags
Offset
Avoid Duplicates
Post IDs from Dynamic Field
Post Status, Max Posts and Order By
Post Status
Max Posts
Order By
Order By Direction
Query ID
Give your query a unique ID. Then you can change the query arguments in PHP with the WordPress add_filter() function, where the filter name is the Query ID. In this example, the Query ID is my_query_additions:
//modify the arguments here.
//widget data is an array with all widget settings
function modifyMyQuery($args, $widgetData){
return($args);
}
add_filter("my_query_additions", "modifyMyQuery",10,2);
Query ID is a Pro feature. To learn more, see Work With Query ID in Posts Selection.
Show Query Debug
Shows the query on the page, so you can check it. In Debug Options, choose Basic or Full. Don’t forget to turn it off before you publish the page.
Manual Selection
Seach And Select Posts
Or Select Post IDs
Avoid Duplicates
Max Posts
Current Query Posts
Current Query Posts
Post Type Override
Max Posts
To learn more, see Current Query Posts Custom Filters.
Related Posts
Related Posts
Related Posts Mode
Include By Taxonomies
Include By Current Post Author
Allow related posts from ‘any’ post type
To learn more, see Related Posts.