A good query builder is a must-have in this advanced age of web development. By building queries you can filter your database, select specific contents, create relationships between two or more separate contents, and much more for the creation of brand new posts or pages.
An advanced query builder not only makes navigation easy for your visitors but also improves the overall presentation of your website or blog. For a better-optimized website, a query builder plays a vital role. That is why Gutenberg has created the ultimate query builder just for you. Gutenberg’s Query builder is easy to use yet is filled to the brim with amazing features. In this article, we will give you a tour of our amazing query builder.
Step 1: How to get to the query builder
Almost every block of Gutenberg comes with our ergonomic query builder. To access the basic functions of our query builder you need to head down to the settings. Right under the general setting, you will find a section named “query”. This where you will be able to tweak with the options and create a query using Gutenberg’s query builder that fits your demands.
Step 2: how to customize the query builder
Gutenberg post blocks give you a query builder with an intuitive and ergonomic interface. It is so easy to use that anyone with the basic knowledge of computers can use it. Yet highly detailed customization is possible due to the plethora of features that account for every little change. All the customizable features in Gutenberg’s query Builder are given below:
Many a time you need to create a query on the go and simply don’t have the time to go through all the little details and customization options for posting your query. This is where Gutenberg’s amazing quick query builder swoops in and saves the day. No longer do you have to go through the time-consuming ordeal of creating a query all by yourself. Gutenberg’s query builder will create a query for you merely at a click on your part.
You will find the quick query right at the top of the query section in settings. You can create quick queries according to different criteria. The “most comment” option will create a query where all your posts that have the most comments will appear. You can even set parameters within the queries. For example, “most comment (7 days)” will create a query in which all the posts that have the most comments within the last 7 days will appear.
The “sticky Post” quick query creates a query for all your sticky posts. The “popular post” on the other hand compiles all the most popular posts in your quick query. Here too you can a set time parameter that can be set to 1,7,30 days or all time. In this case, the popularity of the post will be determined by their view count. The “random post” quick query will compile random posts in your quick query. Here too you can set a time parameter of 1,7 or 30 days.
The “latest posts” quick query creates a query in which all the latest posts appear. You can create this query either according to the published date or the modified date. Similarly, the “oldest post” quick query lets you create a quick query with all the oldest posts. Here too you can create the query either according to the published date or the modified date.
Lastly, the “ Alphabet” quick query lets you create a quick query with your posts arranged alphabetically. You create it either in the ascending order or the descending order.
Gutenberg’s query builder lets you change the type of your posts in your query. You can either set your content as posts or pages. A single click is sufficient to make this change.
Number of Post
This feature lets you limit the number of posts that will be added to your query. A total of 50 posts can be added to a single query. You can either type in the specific number or use the sliding the bar to change the number of posts.
With the ultimate query builder of Gutenberg, you can also change the taxonomy of your query. You can either go with categories or tags. To change from one to the other you simply need to click on their respective buttons. Using category in your query will let you arrange your posts according to different well-known categories. For example, setting the category to health will lead to the inclusion of all posts that are related to health. You can add one or many categories to your queries. Similarly, you can use tags to create your query. Tags work much differently than categories. They go into much more detail wherein categories define the genre of your query. You can use one or many tags to build your query.
For an attractive and easy-to-navigate presentation, the order by which you create your query is crucial. That is why Gutenberg offers you a plethora of ergonomic ways in which you can arrange your content. The basics such as date, title, modified, random are here. On top of this Gutenberg’s query builder also lets you arrange your content according to comment count, meta value number. In the case of “meta value number,” you can even add custom_meta_keys. To change the order you simply need to change the value in the “order by” section.
Here you decide whether you want your query in an ascending or descending order.
Include Post & Exclude Post
Gutenberg’s query builder goes an extra step further to give you the ultimate query. With the help of this feature, you can add separate posts to your query even if they don’t belong to the categories or tags you have specified. This helps you get rid of small technical errors that sometimes ruin your whole content. Similarly, you can even exclude posts that belong to the categories and tags you have specified. This extra layer of customization gives you complete control over your query builder while saving you all the hard work. To include or exclude posts you need to put down the post ids with commas. Both “include post” and “exclude post” have their separate boxes for you to put down the post ids.
Many a time you need to skip certain posts before your content goes live. This necessity might occur due to a number of reasons. Keeping this in mind, Gutenberg’s query builder offers the offset post feature. This handy feature lets you skip a number of posts before going live. For example, if you keep the offset post number to three, it will skip the first three posts before your content goes live.
Gutenberg gives you the ultimate query builder with the least work on your part. The easy-to-use, intuitive interface of the query makes it impossible for you to get confused. All that you need in a query is right here and more. Now with Gutenberg’s query builder, all your time can finally be used to improve your content. Leave everything else to Gutenberg.