Introducing Advanced Query Control: Related Posts, Date Filter & Exclude Options

Use Elementor's Advanced Query Control to show related posts and filter posts according to advanced exclude rules or custom date range.

Play Video

WordPress Related Posts? Don't Need No Extra Plugin for That! 😁 #BuiltInElementor

Starting an online magazine or any other content-heavy site on WordPress is a challenging task. Featuring the right articles at the right time – that’s a big part of the challenge.

To help you better cope with featured posts, we significantly improved the post filtering options available in our Post, Portfolio and Products widgets.

Introducing Advanced Query Control – WordPress post filtering tools which include:

  • Related Posts
  • Date Filter
  • Exclude options

At Elementor, we care about improving existing widgets and features just as much as we care about introducing new ones. Lucky for us, we have the biggest focus group at the tip of our fingers; over 2 million users who use our tools daily and constantly suggest amazing improvements.

The improvements being released are based on suggestions from users. This shows the power of our open source solution that constantly gets better thanks to the power of our community.

Let’s dive in and see how these upgrades give you powerful capabilities when featuring posts on your news, listings and advanced websites. 

Related Posts

Remember spending 4 hours on YouTube, watching one cat video after another? 

This happened because of YouTube’s intelligent use of related videos. Now Elementor users can recreate the same experience and keep visitors engaged for much longer, using Related Posts.

The Related Posts option lets you include and exclude the shown results according to the current author or the current term. Relating terms means the chosen posts will be picked according to a related category, tag or other taxonomy. You can also mix several rules to get a sophisticated filter going.

Related posts are not just for featuring blog posts. If you have a site showing listings, you can use related posts to show more listings on a single listing page, increasing the time your visitors spend on your site. With this feature update, Elementor gives you the option to display related posts without having to use another plugin or custom code.

Here’s a pro tip: Use Elementor’s Popup Builder to add a slide in popup that arrives after readers reach 80% of the article to offer them other related posts on a similar topic (Watch tutorial).

Related Posts Fallback

For those cases where you don’t have related posts, we added a fallback option which will display either manually selected posts or recent posts. This way, you never leave your readers without a recommendation.

Exclude Posts Via Tags, Categories, Authors & More

Let’s say you created a real estate website, with custom taxonomies like city, number of rooms, property size and so on.

With the new query post filters, you can specify elaborate queries when deciding how to display posts. 

For example, for the same real estate site, you can choose to display properties in London, excluding 2 rooms and below, with a property size of 80m and above.  

Ignore WordPress Sticky Posts

A sticky post is a WordPress setting that lets you stick a certain post to the top of your posts list.

Let’s say you have a post you set as sticky. Does that mean that it has to be featured everywhere you show posts?

There are some situations where you would want to stick a post in one area and put it in the normal order in another.

Now, you have the option to switch on ‘Ignore sticky posts’, and have the post appear in its regular order.

A use case for this control is if you want to stick the post and feature it at the top of the list on the homepage, but show the regular order of posts in the sidebar.

This feature joins the ‘Avoid Duplicates’ feature released in Pro v2.1, which allows you to make sure posts are shown only once if several post widgets are used. If you have a magazine-style homepage, be sure to check out this feature.

Filter Posts By Date Range

The new date range control allows you to display posts according to a date range of your choosing.

With date range, you can display posts that were published in the past day, week, month, quarter, year, or pick a custom range.

With the date range controls, you can automate many of your recurring magazine spots, like:

  • Breaking news
  • Featured daily posts 
  • Now trending articles

Seasonal posts (where you display all the posts published around the holidays)

If you decide to set a custom date range, you will need to use the before / after date controls. The Before date will show posts published until a certain date. If you choose 1.1.2019 on before, the widget will show all the posts published until 1.1.2019.

The After date, accordingly, will show all the posts since the chosen date. 

If you set before 1.1.2019 and after 1.4.2019, it will show all the posts published before 1.1.2019 and after 1.4.2019.  

If you set after 1.1.2019 and before 1.4.2019, it will show all the posts published between that timeframe.

Conclusion

This feature will improve the way you filter posts on WordPress, letting you set related posts without having to use code or additional plugins.

The posts, portfolio and products widgets, now with a revamped query control, are great examples how Elementor is a tool that manages to empower your development and design capabilities, all in one tool.

We are very proud of these new features, and have high hopes it will help our users build outstanding websites, both in terms of design and functionality.

Hey, Here’s Your HomeWork!  👩🏼‍🏫

If you are a web creator who builds magazine, blog or any other listing websites, please let us know what you think of these features and whether you plan to incorporate them in your upcoming projects.

 

Credit: All images of GOT were taken from imdb.com

Liked This Article?

We have a lot more where that came from! Join 806,942 subscribers who stay ahead of the pack.
By entering your email, you agree to our Terms of Service and Privacy Policy.

About the Author

Ben Pines
Ben Pines
Elementor evangelist & head of content. Ben has been in the online marketing industry for over 10 years, specializing in content marketing. WordPress has been Ben's platform of choice since the time it was used solely for blogging.

Share on

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp

Comments

97 Responses

  1. Oh my God! There could not have been a better timing for this feature update. I was literally thinking of the best solution to implement related posts and here it is!! Do you guys read our minds or what? Whatever it is, with every update, you guys are truly revolutionizing the way we build websites today. Hats off team Elementor!!

  2. All these features are great but adding a filter option / button where the user can see posts from specific category from all the posts listed when he clicks on button .would be great a feature that i would like to see

    1. Hi all, doubling down on this … Just started using Elementor Pro for a few weeks now, on a new project and cannot believe the lack of Archive Filtering, having to resort in using a combination of other plugin which only creates more integration headache in the while rendering the site heavier and heavier on ressource … shame .. sigh
      (I do like the Related post feature tho but before thinking about where the user will go next, I would like to make sure they can find the first thing they need … isn’t it?)

      1. I have the same problem. No search widget. Nothing.
        Searches require an extra cost plug-n bought from someone else, with compatibility problems.

    2. Yes, absolutely, custom filtering and listing are very much needed. Categories, Tags, Posts from a date range (even just basic stuff like Monthly listings would be a start.)

      This stuff is built into WordPress, you can pull up the default WP widget for Categories (lists your categories, can be a dropdown box) or the Archives widget (lists the Months/Years that contain posts) and clicking their link filters the posts properly using your Elementor-styled normal ‘archive’ page.

      There’s simply no way to generate the list of filters into a menu or even a column outside of the default widgets, which of course are very basic and don’t play well with Elementor’s editor.

  3. Is there a proper guide on how to use this? I use a single post template from the library which covers the way the blog posts are displayed in terms of design. New posts however are actually created normally in the WordPress dashboard. I don’t see any option to add any related posts, am I missing something?

    Gary

      1. Hi Ben,

        May I know what version of elementor was this implemented. I don’t see the Related item under source. I just updated to the latest 2.5.14 version.

        I could be missing something as well.

        Thanks,
        Jaze

  4. Yeah. Really great again. Now we need to have the skin builder and post filter option for the posts widget more than ever. When will it be ready??

  5. Great new features. Still would be better if site visitors could also filter posts, for examples users could filter by category, author, or date range etc.

  6. The article above says…
    “The Related Posts option lets you include and exclude the shown results according to the current author or the current term.”

    However, I don’t see a way to show related posts by the current author. I actually had a conversation with support the other day asking about this feature and they said it is not possible at the moment. Can you please clarify if related by the current author is actually a feature in this newest release?

      1. Hi,

        At the moment I am trying to show related posts based on Author, except because I am the only ‘Author’, I am using tags for guest authors. So if my friend Bill writes a post, I am the ‘author’ according to WP but the post has the tag Bill. So, if I want to add related posts, I can select the tag ‘Bill’ and Bill’s posts will display, no problem.

        However, when I then go to set the conditions, I want the single to apply not only to Bill’s posts, but also to Katie’s posts. This means for Katie’s posts I need the related posts to be based on Katie’s category. But because the single condition is based on the post category, I would have to make a brand new single for Katie’s posts. IE, I want this to dynamically display but I can’t figure out how.

        Any ideas of a work around?

  7. This is an awesome new feature I’ll definitely be trying out on my website! Elementor is aggressively rolling out new feature after new feature. Thanks to the Elementor team for your hard work and for making a tool that makes WordPress look so much nicer and is easier to use!

  8. Related posts is a very useful feature, thank you! Unfortunately, I cannot put it to good use just yet. It should take into account how many tags posts share with each other. A post sharing 5 tags with the current post should appear above a post that shares only one tag. Is there a way to do that?

    1. To make the consequence clear: Once posts have more than one tag, related posts does not work. It simply shows the wrong posts.

  9. Very good feature, thank you! Now a better way to show filters (a filters bar, buttons or so) to make searches easier is needed for a good users experience, first of all for listings and directory sites.

  10. 1) Most of the post’s words are promotional, not explanation.
    2) Trying to understand what this is about, I saw the first image shows the widget heading “edit posts.”
    “Edit posts” is not the name of an “Edit Posts” widget. “Edit posts” is the heading that appears after inserting the “Posts widget.”
    3) “Edit posts” does not edit a post. Instead “Edit posts” is the heading for a widget which describes how an archive-like page will display posts.
    4) Each query selection is hard coded for that specific selection. Different queries each require a dedicated page.
    5) Visitors have no way to search or “query.”
    6) A search of the Knowledge Base for “advanced query control,” and for “query control” found nothing relevant.
    7) In spite of all the problems, I find Elementor Pro worth the aggravation.
    That is high praise for Elementor Pro.

    1. Hi fa1hhc5f, Thanks for your feedback!

      The Query Control is a control featured in several widgets (as mentioned above), but we accept your note regarding not being able to search “Query Control” in our documentation.

      By the way, all explanatory documentation is placed in https://docs.elementor.com/

      Thanks!

  11. I was always hoping that Elementor pro would include a WP Query container and I can just build my own layout that gets repeated accordingly. The container could also manage layout (masory, inline-block, grid etc.). I like a plugin that it renders directly to the page (server side) and not a ajax loading post grid with sorting. This can be a third party or a different widget.

  12. Great changes, this was perfect timing for me and really makes a big difference for clients. One added change request however would be the ability to add the category as a hyperlink to each post on the front page and have it clickable in its related category taking the user to the category archive straight from the posts screen. This would make a big difference. Also adding the ability to have a “show more” option after reaching the chosen amount of posts to display more posts on the same page in the screen rather than a pagination option

  13. Hah- the comment about real estate when the dragon fire treated castle with a real estate caption pops up. And the drunk posting comment. I like seeing this side of Elementor! While there are things I wish were a bit stronger, mainly around support for non-coders, this is a fantastic page builder that has made a huge difference in my business. Truly appreciate all the hard work and OMG – EP1 in Season 8? Gah! #Cheers

  14. Another thing… the idea of going back in an refining controls should be the theme for a couple of weeks. Much like 10.6 (Mac OS X Snow Leopard) back in the day. This mentallity is missing a bit as you have been moving fast for the last years.
    Just as an example… the following things are broken and come to mind from the to of my head: Missing row and section linking, Image caption pulling from WordPress, (Video) Lightbox captions pulling from Elementor, Gradient background in Slider, Fade entrance for Slider content (text), Link options on slides (missing the rench there), Popups that contain video widgets keep playing after closing the popup … I’ll stop. You get the point.

  15. Hello Ben. Does it support filtering by keyword? Say, I need it to display posts that contain specific words like “Travel” etc.

    I know there are plugins that can do that. And it’s very helpful. Just curious if elementor can do it so I can make my site work with less plugins.

    Thanks

  16. These features really help! I just added related posts to my blog posts on my Toolbar Extras plugin website. It was a task of 2 minutes and all is working like a charm.

    Really happy with that! 😉

  17. This is a good addition to an already flexible posts widget. However, I would appreciate if the very basic problem with posts is fixed soon. Whenever we enable pagination of posts & we click the next page, the entire page refreshes & the navigation goes to top of page!

    I have never ever seen any website when you click the pagination at the end of the page & you are taken to very top of the page. Normally the navigation stays where you are, after the page is refreshed

  18. Is there a way to randomize the related posts which are feature using the Query filter?

    For example, I have installed “Posts” on numerous pages of my blog and have chosen to pull related posts using a specific tag — but Query always seems to pull the same three posts from my archive to feature as “related Posts” (pulls them chronologically from my blog)…

    As a result, only the same 3 related posts are bringfeatured across multiple pages when, in fact, I have over 2 dozen to choose from with the same tag. Thanks!

    1. I wonder the same thing. I have lots of evergreen content that I’d like to have resurfaced in this widget, and I actually thought it WOULD be random but was disappointed to realize it just takes the newest items…

  19. Awesome, thank you guys!
    How heavy are the queries on pageload time?
    Any issues with WP Rocket caching [or other caching] like scripts to exclude from cache?

  20. A great feature for the “related posts” query would be to add a dynamic option. This would allow developers to create a default post template that displays related content based on the individual posts — rather than create a template for each category or tag.

    1. Yes! I agree – I didn’t see this as an option and that’s exactly what I am using this for. I don’t want to have to modify this widget for every post/template. They show in one of the screenshots “dynamic” but I don’t see that option. I’m using this for a CPT.

  21. I’ve just tried to use this for the first time but when I did no images show up at all. The title, excerpt and Read More options all show but no images. Does each post or page need a set image for the widget to pull through and use?

    Many thanks.

  22. Hi, I’m really keen to try these new features, but my elementor and elementor pro plugins don’t seem to have the options to update them. Do I need to uninstall and reinstall, or should I wait a while longer?

  23. Very nice feature, but It still lack an option…..
    Lets say I created a list of events for the year, in February….
    It will show all of them… in the post widget….
    Even the ones that is in the past
    How to show only upcoming events ???

  24. This is a major improvement – much appreciated. I hope the pace of enhancements will continue for this element. The Drupal ‘Views’ module should be the goal.

  25. Wauw, I thought finally get rid of the extra plugins used. So today the day to make the change on some websites. But all related works (category) except TAGS. If put related to tags nothing is shown. Anyone else got this ?

  26. Excellent feature, still the only lacking main feature is able to display custom field items in the archive pages.

    Elementor ability to include ACF fields in the archive views +1

  27. Great feature but it would be good if you could filter by “Today” rather than specify a specific date.

  28. I am using this feature to display short descriptions of different packages we offer. I do not want the image to link to a post page. Is there a way to disable the hyperlink?

    1. Hi Matthew, if you’re using a 3rd party addon you should contact their support. Otherwise, you can contact our support.

  29. Hi, thanks for the great post. This will take my design to a new level and as others have said, it couldn’t have come at a better time.

    I wanted to add some plugins on my site, but I don’t see the add plugin options under plugins.

    The plugins I want to add are order bumps, woocormerce currency conversion and sales funnels plugins.

    Please advise how I can add new plugins in the elementor setup because I’m starting to feel stupid.

    Thanks

  30. I’m using a plugin to add categories to pages. When I set the Query source = related, the results come only from posts. I would like the results to reflect both posts and pages.

  31. If I have two categories of posts – one could be MOVIES and the other could be EDM MUSIC,
    will this “advanced query control” allow me to filter which posts are shown in the SIDEBARS?

    Ideally, one sidebar should only contain posts about movies and the other should only contain posts about EDM music. Is this possible with advanced query control?

    MANY thanks in advance for useful feedback!

  32. Hi there,
    Can you tell me how to insert a section template. I’ve turned a section (in this case the footer), into a template, and have tried using the template widget to insert it on a new page but the widget always wants to insert it into a section.

    My problem is that that footer as designed (not by me!), is aligned to the bottom of the page. On the original page when you scroll to the bottom there is no whitespace below the footer. When I use the template widget there is.

    It may be that there is a better way to achieve what I want: a footer that is identical on each page, that can be edited seperately.

  33. Before upgrading to Elementor pro my theme automatically showed posts related by category, I really liked that and am struggling to understand why I cant implement it now.
    I’ve managed to figure out how to set related posts but cannot select by category?
    I’m building a single theme template and the “related posts” seem to be static rather than actually related to individual posts… Hope I’m making sense? lol

  34. Hi i have a question.

    At archive blog (all blog post), i want to create a 3 dinamic images from the 3 most recent blog post with the title in middle of the image. The point is every new blogpost will change those 3 images and then below that section i will have all other blog post without the 3 recent ones. May explain well? Sorry for bad english. I hope someone can help me.

  35. Is it also possible to show related posts by tag from a different post type? For instance to show newsarticles related to a portfolio item.

  36. Hi –

    This is another great feature to have, but also comes up just a bit short for what I need, since the query term can only be a static selection and therefore can’t be used in a dynamic template. You also cannot establish relatedness to a different post type, which is unfortunate as well. Here’s what I mean:

    Say I have a custom post type called “Bands” and another called “Songs”. On the Band page for the Beatles I want to display a list of only Beatles songs. In my template for Bands, if I were to pick “Related”, all I would see is a list of other bands, not songs. If I select the “Songs” post type from the source list, I should be able to select a custom field (ACF or PODS, etc.) that holds the band name, thereby establishing the desired “relatedness”.

    There are many use cases for this within almost every taxonomy you can think of — sports, music, travel, etc. Any chance this type of enhancement could be added sooner rather than later?

    Keep up the great work that you’ve done so far, and thanks for your consideration.

  37. No way to query posts through custom fields? I have events CPT with start and end date. I would like to show only future events in a page, so I have to add conditionally the end date. is there a workaround or so? Thank you

  38. Hello,
    I’m an active Elementor Pro user,
    In Posts Widget, Include/Exclude features are awesome, but, they are not offered when you select Current Query as a Source.
    Since there is no available source for Taxonomies, the only choice to build a Taxonomy Archive is to select Current Query as source and play with the template display conditions (display only in the context of a taxonomy archive)

    Any plan to improve this?
    regards

  39. Is there a way for a user on the front end to filter/sort posts? For example, I as a developer would like to give the user the ability to click on something to sort the listing alphabetically by title, or a drop down that would filter it to show only Travel (category) posts.

Leave a Reply

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

Want to learn how to build better websites?

Join 806,942 Elementors, and get a weekly roundup of our best skill-enhancing content.

By entering your email, you agree to our Terms of Service and Privacy Policy.