Inline content gating with shortcodes
Gate a section, not a whole page — keep the intro public and lock just the premium block with a shortcode.
- Wrap any block
- Conditions inline
- Public + gated on one page
Sometimes you want a public intro and a gated section on the same page. The [arraysubs_restrict] shortcode wraps just the premium block, gating it by status, product, role, lifetime spend, or feature, with a custom message or redirect for non-members. This recipe gates inline content.
- Gate a single section, leaving the rest public.
- Combine conditions inline (AND/OR).
- Show a custom message or redirect non-members.
- Restricted content is omitted from page source entirely.
The exact configuration
Enter these values and you have the setup live. Every field maps to a real ArraySubs setting.
| Setting | Value |
|---|---|
| ShortcodeAny page/post/widget | [arraysubs_restrict] … [/arraysubs_restrict] |
| Key attributesShortcode | status · products · roles · lifetime_spent · feature (Pro) |
| Logic + fallbackShortcode | condition=and|or · message · redirect · login_required |
| Admin bypassShortcode | show_to_admins (default true) |
When to use this setup
Set it up in 2 steps
A step-by-step guide drawn from the ArraySubs user manual. Open the linked page for the full walkthrough and screenshots.
Wrap the premium block
In the editor, wrap the gated content in [arraysubs_restrict status="active"] … [/arraysubs_restrict].
Content-Gating ShortcodesTune conditions and fallback
Add attributes (products, roles, lifetime_spent, feature) and set condition (and/or), plus a message or redirect for non-members.
Content-Gating Shortcodes
This recipe is built from these ArraySubs user-manual guides:
Notes & edge cases
Modules behind this recipe
The ArraySubs modules this setup relies on.
Shortcodes
Display login/logout links, personalized user data, gated content, and Pro store credit forms anywhere.
Member Access
Control who can see, download, and purchase content using flexible rules tied to subscriptions and roles.
Feature Manager
Define product entitlements, limits, and capabilities so customers know exactly what each subscription includes. Pro only.
Related setups to explore
Other configurations you can build with the same modules.
Gate an Elementor section
Lock any Elementor Container (Flexbox or Grid) to members from the builder — no shortcode to type.
Login-state personalization
Show different content to logged-in vs logged-out visitors and greet members by name with account shortcodes.
Gate by Feature Manager entitlement
Unlock content based on a Feature Manager value — e.g. show team-admin docs only when team seats ≥ 10.
Questions, answered
Unlock the complete Pro stack
Start on the free-forever core today, then choose a paid Pro plan when you need the advanced Pro feature set.
No credit card required · Annual and lifetime options available
