[benecaster_current_tier]
Outputs the tier name or slug for the currently logged-in subscriber on a given show. Resolves the visitor’s WordPress user ID, looks up their active token for the show, and returns the tier display name or the tier slug depending on the format attribute. The name comes from wherever the show’s plans live: Memberships → Tiers for a show using Benecaster’s built-in membership, or the membership plugin otherwise.
The tier is the highest one the member holds right now, according to their membership plugin (or built-in membership), in both formats. It is the tier a [benecaster_tier_gate] on the same page ranks, so a member holding two levels gets the higher one, and after a Tier Mapping change it names the newly mapped tier. When the membership plugin reports no level for the member, the tier saved on their subscription is used.
Returns the fallback value for unauthenticated visitors, visitors with no token for the show, or when neither tier list knows the subscriber’s tier. It never prints the raw slug in name format.
Renders nothing, not even the fallback, when the show has no paid features: a show that is not connected to a Benecaster license (never connected, or disconnected), or a site without an active license. The same applies when no show can be resolved.
show_id resolution order: (1) explicit show_id attribute, (2) show or episode single post context, (3) the sole show on single-show installs. On a multi-show install with no explicit show_id and no post context, no show is resolved and the shortcode renders nothing.
The output is plain text: the tier name, the slug and the fallback text are all HTML-escaped, so markup typed into fallback shows on the page as text.
Output filterable via benecaster_current_tier_output; its $tier_slug argument is the tier described above, or null when the fallback was used. The filter does not run when the shortcode renders nothing for one of the reasons above.
Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
show_id |
int |
current show
|
No | ID of the show to resolve the tier for. Resolved automatically from post context or sole-show install when omitted. |
format |
string |
name
|
No | Output format. name — the plan's display name (e.g. 'Founding Member'); slug — the tier's internal slug (e.g. 'founding'). Either way it is the highest tier the member holds now. |
fallback |
string |
— | No | Text to output when the visitor is unauthenticated, has no token for this show, or has a tier the show's tier list does not know. Plain text: HTML typed here is escaped and shows as text. Defaults to an empty string (outputs nothing). Never shown for a show not connected to a Benecaster license. |
Example
<!-- Greet the subscriber by tier name -->
Welcome back, [benecaster_current_tier show_id="3"] member!
<!-- Compare the raw slug in a theme template -->
<?php if ( 'founding' === benecaster_get_user_tier_for_show( 3 ) ) : ?>
You have founding-member access.
<?php endif; ?>
<!-- Fallback text for non-subscribers -->
[benecaster_current_tier show_id="3" fallback="free listener"]