How Query Builder Works for Post Timeline?

Timeline widget provides a very powerful query builder to display posts. Query builder appears when one selects Posts as Content Source under the General tab. Below is the description for query builder options –

There are two Query Types – Main Query and Custom Query.  

Main Query

This is an advanced option that allows displaying posts dynamically dependent on a page on which timeline is displaying.


For Example –

  • Consider you have designed a template with timeline widget and selected option Main Query and set it to display on all archive pages.
  • When you visit any archive page, related posts will display.
  • Let’s say you have posts category – ‘Food’. If you visit the ‘Food’ category page where the above template is applied, you will see timeline displaying posts that are assigned category ‘Food’.
  • Sometimes category can be empty and it does not have any posts to display. In this case, a message entered in If Posts Not Found box will display.

Custom Query

It allows choosing posts, pages, media, templates manually based on categories, tags, author.

1. Post Type –  Timeline widget allows displaying following post type.

  • Posts
  • Pages
  • Media
  • My Templates ( Templates saved with Elementor )

2.  Filter Rule – These rules allow filtering posts on the basis of categories, tags, and author.

  • Every filter rule has two options. To Match or to Exclude.
  •  Choose whether to match or exclude particular categories, tags, and author and start typing the name for the selected option. A drop-down for the related option will appear. Select the exact option from it.
  • For Example, if you wish to display posts for the ‘Food’ category written by ‘Tom’ only. Then choose ‘Match Categories’ option. Start typing Food and choose it from the drop-down list. Choose ‘Match Author’ and start typing ‘Tom’ and choose it from the drop-down list. This will display ‘Food’ posts written by ‘Tom’ in the timeline.

3. Post Filter Rule – Allows selecting posts manually.

  • You can display particular post with Match Posts filter rule. Select this option and start typing the name for the post that you wish to display.
  • Or you can Exclude particular post. By default, all posts will display. Choose this option and start typing the name for the post that you wish to exclude.

4. Ignore Sticky Posts – 

  • What is the sticky post  – Sticky Post option will stick a post to the front page. You can set some posts as Sticky to make them appear above the other posts. This allows highlighting specific posts.
  • For example – Say you have 10 posts published. Then by default post will publish in reverse chronological order. That means posts will display in order 10,9,8,7 and so on. Consider 5th post is marked as sticky. Then it will display at the top of the page. So the sequence for the posts will be 5,10,9,8 and so on.
  • Refer a link here to see how to mark post a sticky.
  • If you select to Ignore Sticky Posts then posts will display normally in reverse chronological order and the sticky post will not be displayed at the top in the timeline.

5. Post Order – Selected posts can be ordered on the basis of date, title, menu order or can be displayed randomly.

If Posts Not Found

If query builder does not found any posts to display it shows Posts Not Found message. And offers Search Box to the user ( only if enabled ). You can edit this message with If Posts Not Found box options.

Not the solution you are looking for? Check other articles, or open a support ticket.