Premium add-on for Bricks Builder

Display category posts in accordion

We shall display the categories posts in accordion layout with the Bricks accordion nestable element. Here we shall use two loops builder: 1st one will fetch the terms of a selected taxonomy and 2nd one will fetch the post(s) based on term ID. Checkout the video below In this demo, I fetched the post categories and their related posts. But you can use it for the custom taxonomy and fetch their related custom post-type content.

Continue Reading

Add aria-label attribute to Mini Cart link

The Mini Cart element of Bricks Builder is not adding the aria-label property to the anchor link. But you can add it with a small PHP code. Open the functions.php file of the bricks child theme or put the code in your 3rd party snippets plugin. Replace the ENTERARIALABEL text in the above code with your valid aria-label text. Explanation: Bricks have filter bricks/element/render_attributes. So you can add your own custom attributes to any HTML markup. Here I used this filter. This filter is accepting the 3 parameters: attributes in…

Continue Reading

Get the most viewed posts with Post Views Count plugin and Bricks

In this tutorial, we used the 3rd party plugin “Post Views Count” plugin for tracking the post views counter. You will install, activate, and setup the settings of the plugin as per your requirement. Here I am giving the compatibility query builder provider for the Bricks builder editor. Creating Loop Builder Provider Open the functions.php file of your Bricks child theme or you can use any 3rd party snippets plugin. Enter the following codes: This code will create the custom provider for the Bricks loop builder. You can easily make…

Continue Reading

Display popular posts in bricks

We will display the popular posts(most viewed posts) with the bricks loop builder. If you don’t want to use a plugin, then you can use this method. Storing Views Counter in The Custom Field Open the functions.php of the bricks child theme or drop the following code into the 3rd party snippets plugin. Once you have used this code, every time a user visits the single post page, the custom field wpbu_post_views_count will be updated.  Note: If you are using a caching plugin, then this method will not work by default. You…

Continue Reading

Display only sticky posts with the loop builder

In this tutorial, I shall show you how you will list the all sticky posts with the bricks loop builder. Make sure that you installed the BricksUltimate add-on and activate the Ultimate Query Builder option from your Dashboard -> Bricks -> BricksUltimate -> Misc tab. Now add one element of these container, block, and div elements to the canvas and enable the loop option. Select the Query -> Type -> Ultimate Query Builder -> Custom WP Query provider. Drop the following PHP code in the code text box and create…

Continue Reading

Displaying today’s post with the Bricks loop builder

BricksUltimate has a Custom Wp Query loop builder. With it, you can create your own custom query. Here we will use the “date_query” args and filter the WP Query loop. BricksUltimate released the Post Grid element. You can use this element or use the native bricks container/block/div element to build the posts list. Select the “Ultimate Query Builder” from the Query -> Types dropdown and choose the Custom WP Query from the next dropdown. Enter the following PHP code into the code box. It will fetch only today’s post(s). If you are getting the wrong post title and permalink, you…

Continue Reading

Displaying the posts from today’s date

Here we shall display the posts which are published today or later. You know that BricksUltimate has a custom wp-query loop builder provider. With this option, we shall create our custom query args and build the query. Here we will use the “date_query” args and filter the post’s WP Query loop. BricksUltimate recently released the Post Grid element. You can use this element or use the native bricks container/block/div element and enable the loop option. Select the “Ultimate Query Builder” from the Query -> Types dropdown and choose the Custom…

Continue Reading

Creating a listing section with the Metabox checkbox list and loop builder

We are creating a list with the help of the Metabox checkbox list field type and controlling them in our dashboard. Now we shall display them in list format with the Bricks List element and loop builder at frontend. See the video below

Continue Reading

Adding the post’s CSS classes in the loop builder element

We can add the post classes into the loop builder element wrapper. By default, the bricks loop builder is not adding the post classes. If you have the BricksUltimate add-on, you will get {post_class} dynamic tag which is fetching all CSS classes of that particular post. With this CSS class, you can differentiate your posts and add a unique style(if you need it). Before After

Continue Reading

Adds custom attributes to the popup wrapper

How do you add your own custom attributes to the popup outer wrapper? Here I am sharing a simple snippet. You will add it to the theme’s functions.php file or any 3rd party snippet plugin. bricks/popup/attributes is a filter. It is accepting the two parameters: attributes in array format and popup id in integer/string format. In the above code, I targeted the specific popup with the popup ID. You will replace the ID 7042 with your popup id. Here I am adding a custom CSS class and data attribute. You…

Continue Reading