Posts Grouped by Authors in Bricks

This Pro tutorial for Bricks users provides the steps to loop through users and inside that, through posts whilst setting the inner query's author parameter to the one in the outer loop for outputting posts grouped by their authors.

We shall fetch 4 posts in each group and render a "See more posts by this user" button only for users that have published more than 4 posts. The button will be linked to author posts' URL.

Step 1

Edit a Page with Bricks.

Copy this JSON and paste to get:

Step 2

Add the following in child theme's functions.php or a code snippets plugin:

This is a BricksLabs Pro tutorial.

For full access login below or create your BricksLabs Pro account

Instant access to all 250+ Bricks code tutorials with BricksLabs Pro