🔍How to use Query Slider
Last updated
Last updated
This guide covers how you can create stunning product/post slider using block slider query feature.
You can create hassle-free product/post slider in a matter of mins with the block slider plugin.
You can enable the query mode from the starting placeholder in the block slider:
Once you've enabled the query mode. You can now see an additional option panel under "Slider Settings" named as "Query".
This is you can configure the query to fetch posts relevant to your needs.
The query panel only appears if you've entered the query mode as explained above.
The query panel contains bunch of options that allows you to configure the query as per your specific need.
Let's go through each of them in detail:
This powerful toggle allows you to inherit the global wordpress query from the template where the slider is inserted.
Inheriting global query is very powerful, and can help you achieve creating complex sliders for the following use cases:
Archive Slider: You can insert the slider (with inherited query) on an archive page and it'll automatically iterate through the archive posts of that particular category/taxonomy.
Results Slider: You can insert the slider (with inherited query) on search result page and it'll automatically iterate through the search result posts of that particular searched term.
WordPress contains different types of content and they are divided into collections called “Post types”. By default there are a few different ones such as blog posts and pages, but plugins could add more.
You can select the post type from which posts you need to display in the query slider.
if you're creating a product slider with WooCommerce. You need to use the "product" post type in order to fetch particular products.
As the name suggests, max items control allows you to basically control the maxiumum amount of posts the query slider can fetch.
Order by control allows you to control the fetched posts order. You can choose order from the following list
Newest to oldest: Orders post from the newest to oldest date.
Oldest to newest: Orders post from the oldest to newest date.
A -> Z: Orders post in alphabetical order based on their title from "A" to "Z"
Z -> A: Orders post in alphabetical order based on their title from "Z" to "A
WordPress allows you to stick a post so that it always appears on front (first) when posts are queried.
Using this control you can control the sticky posts behaviour in the query slider:
Include: Includes the sticky posts so that they appear on top (first) when posts are queried.
Exclude: Excludes the sticky posts from the query slider
Only: Only fetches the posts that are sticky and matches the other query criteria. Selecting this option will exclude every other post that is not sticky from the query slider.
Aside from the basic query modification controls above. Block slider also allows you to filter the queried posts.
Allowing you to basically narrow down further to match your content needs.
You can specifically search through the queried posts based on search keyword. Adding a search term here searches through the "content" and "title" of the post.
Taxonomy filters allows you to basically narrow down the queried posts based on the taxonomy terms.
Taxonomy filters changes based on the allowed taxonomy and the selected post type.
You can also filter the queried posts based on the post author.
You can also further extend the query slider if you have any specific needs with the help of the following filter
1️⃣blockslider_query_argsLearn how you can create a WooCommerce product slider in the following guide.
🛒How to create WooCommerce Product Slider