User Role Conditional Output in Bricks

This Pro tutorial provides the steps to output elements based on their CSS class to users of the specified role in WordPress when using Bricks Builder.

We shall set up two conditions:

  1. Elements having a class of for-admins to be rendered only to admins.
  2. Elements having a class of for-subscribers to be rendered only to subscribers.

Add the following in child theme's functions.php or a 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