Get 30% discount on lifetime membership by using BFCM2023 coupon.
Offer ends on 30th Nov 2023 at 11:59:59 PM UTC.

User Role Condition in Bricks

This Pro tutorial provides the steps to conditionally output elements depending on the currently logged-in user's role.

Step 1

Create a section Template having the content you wish to output for users having a specific role.

Sample name of a Template for author user role: Author User Role Content

Edit and build it with Bricks.

Step 2

Add the following in your child theme's functions.php:

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