5th Mar '24/8 commentsPost Views Counter Query Loop in BricksSridhar Katakam Looking to output the most viewed posts in your Bricks site in a query loop? This Pro tutorial shows how. Install and activate the free Post Views Counter plugin. Select post types for which post views will be counted in the plugin's settings. It is enable for post by default. In the Bricks editor, set up a query loop on a Block element, enable PHP query editor in the query popup and paste: This is a BricksLabs Pro tutorial. For full access login below or create your BricksLabs Pro account Username Password Remember Me Forgot Password Tagged: BricksPluginsProQuery LoopSridhar KatakamSridhar Katakam is a Bricks enthusiast. He likes helping others by researching and solving WordPress-related problems and building websites.Get access to all 630 Bricks code tutorials with BricksLabs Pro
Using WP Grid Builder Facets with Bricks’ Query LoopUpdate: This tutorial was written before WPGB had a Bricks add-on. Now, it is advisable to use that add-on instead. Get it from here. Updated…Read more →Categories: Bricks, FreeTags: Query Loop, WPGridBuilder
How to List Your Posts Divided by Categories in BricksIn this tutorial, we'll learn how to display a list of posts divided by each category. The DOM tree Here is how I structured my…Read more →Categories: Bricks, FreeTags: Dynamic Data, Query Loop
Load more for Query loops in BricksDid you know that Bricks has AJAX loading for query loop posts on-click out of the box?Read more →Categories: Bricks, FreeTags: Load more, Query Loop
Pro How to Query WordPress Taxonomy Terms by Hierarchy Level in BricksHow to limit the terms of a Bricks Terms query to only those at a specific level within the taxonomy hierarchy.Read more →Categories: Bricks, ProTags: Terms Query
Pro Dynamic Remaining Posts Count for Load more Button in BricksA user asked in the Bricks Facebook group: I have a loop of a CPT, showing 10 in a total of 16 posts and a…Read more →Categories: Bricks, JavaScript, ProTags: Load more, Query Loop
Pro Bricks Query Loop – How to Insert Elements After Every Nth PostUpdate: Follow this tutorial instead. This Pro tutorial provides the steps to output element(s) in a Bricks' query loop after every nth post. Use case:…Read more →Categories: Bricks, ProTags: Loop Index
Pro Post sub field Bricks Query Loop in a Meta Box Group fieldLet's consider this Meta Box field group for Pages: FAQs is a Group-type of field in which one of the sub fields is "Answer Post",…Read more →Categories: Bricks, Plugins, ProTags: get_query_for_element_id, Meta Box, Nested Queries
Related Posts by Author in BricksQuerying posts on single posts by the author of the current post.Read more →Categories: Bricks, FreeTags: Query Loop
Pro Building Prev / Next Posts with Query Loops in BricksFollowing on from our tutorial on Adding Custom WP_Query Loops in Bricks, in this pro tutorial we'll walk through the process of using those same…Read more →Categories: Bricks, ProTags: Adjacent posts, bricks/query/run, Query Loop, WP_Query