Child Posts Section in Bricks

This Pro tutorial provides the steps to limit the posts (can be of any post type) output by Bricks' query loop to children of the current single post being viewed on the front end.

Note: The post type should be set to be hierarchical with Page Attributes support.

We shall also ensure that the Section gets rendered only if there is at least 1 child for the current post.

Step 1

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 390+ Bricks code tutorials with BricksLabs Pro