Sky Addons for Elementor

⌘K
  1. Home
  2. Docs
  3. Sky Addons for Elementor
  4. Dynamic Content
  5. Query Builder

Query Builder

How to Use the Query Builder in Sky Addons Widgets

The Query Builder is the Elementor query builder built into Sky Addons, and it is the Query section inside every post grid, carousel and list widget the plugin ships. It decides which posts, pages, products or custom post type entries a widget loops over: where content comes from, how many items appear, which categories and authors are kept or dropped, and how results are sorted. It is a separate system from dynamic content and dynamic tags, which fill one control with one value. Because more than twenty widgets share this control set, learning it once carries across all of them. This documentation walks you through every control, what each one filters, and two worked examples.

Features:

  1. Any Source: Posts, pages, products, any public custom post type, a hand-picked list, the current archive query, or related content.
  2. Include and Exclude Tabs: Narrow by authors or terms, then drop specific posts, authors, terms or the post being viewed.
  3. Date Filtering: Past day, week, month, quarter or year, or an exact Before and After range.
  4. Sorting and Offset: Order by title, ID, date, author, comment count, menu order or random, and skip items from the top.
  5. WooCommerce Options: Show all, on-sale or featured products, and hide free or out-of-stock items.
  6. Archive Awareness: The Current Query source makes a widget inherit whatever WordPress is already showing.

Where to Find the Elementor Query Builder

There is no separate admin screen. The Query Builder lives inside each looping widget and is configured per instance.

  1. Open the Elementor editor on the page or template you are building.
  2. Drag in a content widget from the Sky Addons group, such as Post List, Ultra Grid, Mate List or Generic Carousel.
  3. Open the Content tab and click the Query section.
  4. Set Source first, then work down. Several controls only appear once a matching Source is chosen.

Choosing a Source

Source is the first control and the one everything else reacts to. It lists every public post type under its own label, so a WooCommerce site shows Products. Elementor’s template library and the media library are left out. Three special sources sit below.

  • A post type (Posts is the default): a normal query. Only published entries are returned, so drafts, pending and private items never appear.
  • Manual Selection: pick items by hand in the Search & Select field below. The search covers all post types at once, so a page, a post and a product can share one widget. Include and Exclude disappear, since a hand-picked list has nothing left to filter.
  • Current Query: the widget reuses the query WordPress already ran for the page being viewed. Most of the section hides itself, as explained below.
  • Related: on a single post view, queries other entries of the same post type by the same author. Setting Include By to Authors replaces that author with your own selection. It only returns results inside a singular template.

Current Query and Why It Matters in an Archive Template

Every page WordPress serves has already run a query before Elementor renders anything: posts in this category, posts by this author, posts matching this search. Current Query tells the widget to loop over that result set instead of building a new one. That is what lets one design cover a whole site. Inside a Sky Addons Archive Page template, a grid set to Current Query shows category posts on a category archive and search results on the search page, with no template per taxonomy.

Because WordPress supplies the filtering and sorting, the controls that would fight with it step aside: Include, Exclude, Date, Order By, Order and the featured-image filter all hide. Items per page comes from Settings → Reading, not the widget’s Limit field. If you need a fixed count or custom ordering, choose the post type directly instead.

Include and Exclude

Two tabs sit under Source. They appear for every post type source and for Related, and are hidden for Manual Selection and Current Query. On the Include tab, Include By accepts Authors, Terms or both, and each choice reveals its own search field.

  1. Authors: type a name and select one or more users. Only their posts are returned.
  2. Terms: select categories, tags or custom taxonomy terms. Results are labelled with their taxonomy, so you see “Categories: Tutorials” rather than a bare “Tutorials”. Only taxonomies registered for the Source post type are offered, so the field looks empty until Source is right.

The Exclude tab works the same way, but Exclude By offers Authors, Current Post, Manual Selection and Terms. Manual Selection reveals a Search & Select field for naming posts to drop; Current Post removes the entry being viewed, which is what a “You might also like” row needs. When the same author or term appears on both tabs, Exclude wins. Terms from several taxonomies are combined, so a category plus a tag returns posts matching both.

Limit, Offset, Order and Dates

  1. Limit: how many items the query returns, 6 by default. In widgets that paginate, this is the count per page.
  2. Offset: how many items to skip from the top, 0 by default. Set it to 1 when a hero above already shows the newest post. Offset applies per page and the reported total is adjusted, so pagination keeps working instead of repeating items.
  3. Date: All, Past Day, Past Week, Past Month, Past Quarter, Past Year or Custom. Presets are rolling windows counted back from render time, not calendar periods. Custom reveals inclusive Before and After pickers; setting only one creates an open-ended range.
  4. Order By and Order: sort on Title, ID, Date, Author, Comment Count, Menu Order or Random, in ASC or DESC. Defaults are Date and DESC. Order By is hidden for the Current Query and Product sources, where sorting is handled elsewhere.

Sticky Posts and Product Filters

Ignore Sticky Posts appears only when Source is Posts and is switched on by default, keeping sticky posts in normal date order. Switch it off for WordPress’s usual behaviour, where posts marked sticky jump to the front of the widget regardless of date.

Setting Source to Products reveals three WooCommerce controls, which is how a general grid becomes a shop layout like WooCommerce Products.

  1. Show Product: All Products, On Sale or Featured, reading WooCommerce’s own sale list and featured stars.
  2. Hide Free Product: removes anything priced at zero.
  3. Hide Out of Stock: removes products marked out of stock, using the same visibility data the shop pages use.

Two further controls close the section and are part of Sky Addons Pro: Only Featured Image Post, which hides posts with no featured image so cards never render an empty image area, and Query ID, which names the query so it can be modified server side.


Elementor Query Builder Control Reference

Conditional controls only appear once their matching Source or tab option is selected.

ControlWhat it filtersExample
SourceThe post type or context looped overProducts, for a shop grid
LimitItems returned, per page6 for a three-by-two grid
Search & SelectThe exact items, hand-pickedThree named case studies
Include By → AuthorsKeeps only those users’ postsIn-house editors only
Include By → TermsKeeps only those categories or tagsCategories: Tutorials
Exclude By → AuthorsDrops those users’ postsHide guest contributions
Exclude By → TermsDrops posts in those termsHide anything tagged Sponsored
Exclude By → Current PostDrops the entry being viewedA related row under an article
Exclude By → Manual SelectionDrops named postsKeep a pinned guide out
Show ProductProduct visibility setOn Sale, for a deals carousel
Hide Free ProductRemoves zero-price productsPaid downloads only
Hide Out of StockRemoves unavailable productsA buyable-now slider
OffsetSkips items from the top1, when a hero shows the newest
DateThe publication windowPast Month, for a roundup
Before / AfterAn exact inclusive rangeOne quarter’s posts
Order ByThe field results sort onComment Count, for popular posts
OrderSort directionDESC for newest first
Ignore Sticky PostsWhether sticky posts jump aheadLeave on for strict date order

Example: Latest Posts From One Category, Minus a Pinned Guide

A “More tutorials” grid showing the six newest tutorials, never repeating the flagship guide already featured at the top of the page.

  1. Drag a Post List or Ultra Grid widget onto the page and open Content → Query.
  2. Set Source to Posts and Limit to 6.
  3. On the Include tab, set Include By to Terms, type “tutorials” and select Categories: Tutorials.
  4. On the Exclude tab, set Exclude By to Manual Selection, then search for your flagship guide by title and select it.
  5. Leave Offset at 0, Date at All, Order By at Date and Order at DESC.
  6. Leave Ignore Sticky Posts on, so a sticky post elsewhere does not push into this grid.

The visitor sees the six most recent tutorials, newest first, and the flagship guide never appears twice. Publish a new tutorial and it enters the grid on its own, pushing the oldest off the end.

Example: An Archive Template Grid That Inherits the Current Query

This is the case that most repays understanding the Elementor query builder: one template laying out every category, tag, author and date archive on the site.

  1. Create an Archive template in the Sky Addons Theme Builder and open it in Elementor.
  2. Add a heading and give it an archive dynamic tag so the title follows the archive being viewed.
  3. Below it, drag in Ultra Grid or Luster Grid and open Content → Query.
  4. Set Source to Current Query. Include, Exclude, Date, Order By and Order disappear, because WordPress supplies them.
  5. Style the cards, then set the template’s display conditions to cover the archives you want.
  6. Preview a category archive, then a tag archive, then an author archive.

Each renders the same layout with the right posts inside it, and pagination follows Settings → Reading. A category added later inherits the design with no further work. To change how many posts appear, edit the Reading setting; Limit has no effect here.

Best Practices

  • Set Source before anything else. The term picker, product controls and sticky switch all key off it, and changing Source later can strand a filter that no longer applies.
  • Prefer terms over manual selection for anything ongoing. A category filter picks up new posts by itself; a hand-picked list needs editing every time you publish.
  • Use Current Query in templates, explicit sources on pages. Landing pages want a curated set; archive templates almost always want to inherit.
  • Pair Exclude → Current Post with Related. Related content listing the article the reader is already on looks broken, and one option prevents it.

Troubleshooting

  • The widget shows nothing. Either the filters match no posts, or the content is not published, since only published entries are returned. An excluded term is also removed from the include list, so including and excluding the same category returns nothing. Clear the Exclude tab and add filters back one at a time.
  • The Terms field finds nothing. Term search is limited to taxonomies registered for the current Source. With Source set to Pages, which normally has no taxonomies, nothing can appear. Set the right post type first.
  • The current post still appears in a related row. Exclude → Current Post needs a real singular view to have something to remove, so test on the live post rather than in a preview, and add the item under Exclude → Manual Selection for certainty.
  • Most of the Query section vanished. Source is set to Manual Selection or Current Query. Both replace the filtering rather than adding to it, so controls that no longer apply are hidden. A short final page of results usually means a non-zero Offset.

Frequently Asked Questions

What is the Query Builder in Elementor?

It is the panel section that decides which content a looping widget displays. Rather than writing a query in code, you choose a source, add include and exclude filters, set a date window and sort order, and cap the number of items.

Which Sky Addons widgets have a Query section?

More than twenty: the post grids and lists, the content carousels and sliders, and the accordion and list widgets that can be fed from posts. If a widget displays your posts, its Content tab carries this Query section.

How do I show posts from only one category?

Set Source to Posts, open the Include tab, set Include By to Terms, then search for the category and select it. Each result is labelled with its taxonomy, so you can tell a category from a same-named tag.

What does Current Query mean in the Elementor query builder?

The widget shows whatever WordPress already decided to show for the page being viewed: a category’s posts on a category archive, results on a search page. Use it in Theme Builder archive templates so one design covers every archive, and set items per page under Settings → Reading.

Is the Query Builder the same as dynamic tags?

No. The Query Builder chooses which items a widget loops over; dynamic tags fill a single control with a value from the current post, term, user or product. If a tag comes out empty, the dynamic content troubleshooting guide covers the usual causes.

Conclusion

The Query Builder is what turns a static layout into a page that keeps itself current. Once you are comfortable with Source, the Include and Exclude tabs, and the difference between an explicit query and Current Query, the same Elementor query builder knowledge carries across every grid, list, carousel and slider in the plugin. If a query is not returning what you expect, work through the Troubleshooting list above, and contact wowDevs support if you need help with your specific setup.

How can we help?