[benecaster_explicit_badge]
Shows the “Explicit” label for an episode, the same one Apple Podcasts and other apps display.
You do not normally need this. Benecaster already puts the badge on your episode pages, your episode lists and your player automatically. Use the shortcode when you want the badge somewhere else — a custom layout, a sidebar, a template of your own.
It works out the right answer for you. If you set an episode as explicit, it shows. If you left that episode set to follow the show, it uses the show’s setting. Nothing for you to check.
Clean episodes render nothing at all. Not an empty element, not a “Clean” chip — an empty string. That is almost always what you want: a badge that appears on every episode carries no information. Set show_clean="true" if your design genuinely needs a positive clean marker.
Output shape:
<span class="benecaster-explicit-badge benecaster-explicit-badge--explicit benecaster-explicit-badge--context-shortcode"
role="img" aria-label="Explicit content">Explicit</span>
Two class modifiers are always present: --{mode} (clean, yes, or explicit) and --context-{surface} (shortcode here; single, card, list, or player on the automatic placements). Between them, most restyling is plain CSS with no PHP.
Accessibility is built in and should stay that way. The badge carries role="img" and an aria-label, because colour and a single letter mean nothing to a screen reader. If you replace the markup via benecaster_explicit_badge_html, carry an equivalent across.
Filters: benecaster_explicit_badge_mode overrides the resolved value before render, benecaster_explicit_badge_label changes the wording, and benecaster_explicit_badge_html replaces the markup entirely. The mode filter runs first and its result is what the other two receive.
Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
episode_id |
int |
current post
|
No | Episode to render the badge for. Falls back to the current post when omitted, so inside an episode loop or on a single-episode template you can leave it off entirely. |
show_id |
int |
resolved from episode
|
No | Rarely needed. Resolved from the episode automatically; on a single-show install the sole show is used. Supply it only when rendering outside any episode context on a multi-show install, where the badge would otherwise have no show default to inherit from. |
show_clean |
bool |
false
|
No | Set to `true` to render a "Clean" badge on non-explicit episodes instead of nothing. Off by default because a badge on every episode tells the listener nothing. |
Example
<!-- Inside an episode loop or single-episode template — no attributes needed -->
[benecaster_explicit_badge]
<!-- A specific episode, anywhere on the site -->
[benecaster_explicit_badge episode_id="201"]
<!-- Show a positive "Clean" marker as well as the explicit one -->
[benecaster_explicit_badge show_clean="true"]