Worked example — Leader-only sidebar via User Group Role
What we're building
A leader-only sidebar on a group page — a section of the page that's visible only to users whose role in the current group is Leader. Group members and administrators don't see it; non-members and logged-out visitors don't see it either.
This is a common pattern when leaders need their own toolbox — links to manage members, post group-wide announcements, view group analytics — without cluttering the page for everyone else.
The mechanism: the User Group Role conditional-logic condition added in Lifter Elements 1.7.0. It evaluates the viewer's role in the current group post and shows/hides any widget, section, or column based on the result.
- Lifter Elements 1.7.0+ with LifterLMS Groups installed and activated
- Elementor Pro (required for the Conditional Logic feature)
- A group with at least one user assigned the Leader role (so you have someone to test as)
- A group page or group page template to edit — easiest if you've already built the Group landing page template walkthrough
Step 1 — Add the sidebar section
Open the page or template you want to add the sidebar to. In Elementor's canvas:
- Drag a new Section onto the canvas with a two-column structure (or however many fit your design)
- Designate one column as your main content and one as the sidebar
- In the sidebar column, drop the widgets you want leaders to see — for example:
- A Heading widget with text "Leader tools"
- A Button widget linking to the WordPress admin's Members → Manage Members page for this group
- A Text widget with quick reference info on leader responsibilities
- Style the column with a distinct background color or border so it visually reads as a separate panel
For now, the whole section is visible to everyone. Next we'll gate it.
Step 2 — Open Conditional Logic on the section
You can apply the condition at one of three levels:
- The entire section — hides the whole sidebar including its background. Use this if there's nothing else in the section.
- The sidebar column only — hides just the column; the rest of the section stays. Use this if the section also contains main content.
- Each widget individually — most granular, but verbose. Skip unless you have a specific reason.
For this walkthrough we'll gate the column (option 2), which is the most common case.
- Click the sidebar column to select it (not a widget inside it)
- In the panel on the left, switch to the Advanced tab
- Scroll to find the Conditional Logic section, expand it
- Click Open Conditional Logic Settings
A modal opens with the conditional-logic rule builder.
Step 3 — Add the rule
In the rule builder:
- Click Add Rule
- Set the first dropdown (the condition type) to User Group Role
- Set the operator to is
- In the value dropdown, choose Leader of current group
The full rule reads: User Group Role is Leader of current group.
- Click Save
When you save, the modal closes and the editor preview updates. If you're previewing as a logged-out user (or a non-leader), the sidebar column disappears from the canvas immediately — Elementor honors the condition even in the editor preview.
Step 4 — Verify on the frontend
The editor preview is a reasonable indicator, but always test with real user accounts to be sure:
- As a Leader: log in as a user assigned the Leader role in this specific group. Visit the group page. The sidebar should render.
- As a Member: log in as a regular member of the same group. Visit the page. The sidebar should be hidden.
- As an Admin: log in as a group administrator. Visit the page. The sidebar should be hidden (admins are not leaders).
- As a non-member: log in as a user who isn't enrolled in the group. The sidebar should be hidden.
- Logged out: visit the page in an incognito window. The sidebar should be hidden.
If any of those don't behave as expected, see the Troubleshooting section of the main guide. The most common cause is Elementor's element cache serving stale output — re-save the page in Elementor to bust it.
Variations
The same pattern works for several adjacent use cases by changing only the rule's value:
| Goal | Rule |
|---|---|
| Show only to group admins | User Group Role is Administrator of current group |
| Show only to members (excludes leaders + admins) | User Group Role is Member of current group |
| Show to any role in the group (members, leaders, admins) | User Group Enrollment is Enrolled in current group |
| Show to non-members only (e.g. a "Join us" CTA) | User Group Enrollment is not Enrolled in current group |
You can also chain rules using the AND / OR logic at the top of the rule builder — for example, show a section to leaders AND admins of the current group by adding two rules joined with OR.
What to try next
- Combine roles with seat availability: show a "Group is full" notice in the leader's sidebar only when the group has no open seats — useful for nudging leaders to manage member churn. Add a nested condition on a widget inside the leader-only column: Group Seat Availability is Current group has no open seats.
- Apply to a specific group, not all groups: pair this with a Theme Builder template whose display condition is limited to a single group post. The sidebar then only appears for that one group.
- Build a public-vs-private group split: see the Group landing page template walkthrough → "What to try next" for the inverse pattern (hide CTAs from non-members) using User Group Enrollment.