Categoría: BRICKS FREE QUERY LOOP
-
Bricks Templates Query Loop
In the Bricks forum a user asks: In the new update in Bricks 1.10We have templates screenshot feature for templates.I created a query loop for my templates and I need to call the screenshot of the template in the query loop.Can anyone help me, please? Bricks 1.10, currently in beta adds support for Template screenshots.…
-
Posts Related by Current Post’s Terms in Bricks
One of the frequently asked questions in the various Bricks community sites is: When viewing a single post (regular or a custom post type’s) I would like to show other posts assigned to the same categories/tags/custom taxonomy terms as that of the current post. How do I do this? This is how: In your posts…
-
Related Posts by Author in Bricks
Looking to query posts on single posts by the author of the current post whilst excluding the current post in Bricks? Here’s the PHP query for that to use in a Bricks query loop: This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the…
-
Bricks Query Loop – Posts Authored by Logged in User
Looking to limit the posts in a Bricks query loop to those authored by the currently logged-in user? Click the query icon for the query loop, enable PHP editor and paste: if ( is_user_logged_in() ) { return [ ‘post_type’ => ‘post’, // change this to your post type ‘posts_per_page’ => 100, // a large number…
-
Random Posts in the Same Category as the Current Single CPT Post in Bricks
Consider this scenario: CPT: Practice AreaTaxonomy: Category (the built-in category taxonomy) Requirement: When viewing single practice area CPT posts, show 4 random posts (the regular blog posts) that are assigned to the same category/categories as the current CPT. Here’s how query loop can be set in Bricks to show related posts by a taxonomy’s terms:…
-

Load more for Query loops in Bricks
Did you know that Bricks has AJAX loading for query loop posts on-click out of the box? This article shows how AJAX Load more functionality can be configured in Bricks. Step 1 Edit your Page/template with Bricks. Copy and paste the fully built Section of the above demo using this JSON. Note: A few ACSS…
-

How to add a layout toggle on query loops in Bricks
In this tutorial, we’ll show you how to change the layout of your query loop container based on the click of an icon toggle sitting on top of it. Table of Contents Introduction DOM Structure The JavaScript The CSS Final Result Introduction Are you willing to let your users choose from different layout options for…