Skip to main content

benecaster_show_episode_content

Filter Free

Controls whether the episode page shows the full show notes or the teaser to the current visitor. Starts at whether they can access the episode. The sibling of benecaster_show_episode_player, with the same arguments — a preview add-on that unlocks the player can unlock the notes too, or a time-limited-access add-on can lock both.

Applied in templates/episode/single.php before the episode/content part renders. A theme that overrides single.php must apply it itself to keep the behaviour. It changes the WEBSITE only — the feed is gated separately.

Unlock the show notes wherever you unlock the player

Free Beginner

Give a preview or trial add-on the same access to the show notes that it gives the player, instead of unlocking one and leaving the other showing the teaser.

The two filters take the same four arguments — ( bool $show, int $episode_id, ?int $user_id, ?string $user_tier ) — so one callback can decide both.

Website only. The feed is gated separately, by availability and the bridge — neither filter changes what a podcast app receives.

<?php
$my_trial = function ( bool $show, int $episode_id, ?int $user_id ): bool {
    return $show || ( $user_id && my_trial_is_active( $user_id ) );
};
add_filter( 'benecaster_show_episode_player',  $my_trial, 10, 3 );
add_filter( 'benecaster_show_episode_content', $my_trial, 10, 3 );

View on GitHub →

Parameters

Name Type Default Description
$show_content bool Whether to show full episode content to the current user
$episode_id int ID of the episode
$user_id int|null WordPress user ID; null if not logged in
$user_tier string|null Current tier slug; null if user has no active tier

Returns: bool

Example

add_filter( 'benecaster_show_episode_content', function( $show_content, $episode_id, $user_id, $user_tier ) {
    // Grant content access to site admins regardless of tier.
    if ( $user_id && user_can( $user_id, 'manage_options' ) ) {
        return true;
    }
    return $show_content;
}, 10, 4 );

Notes

Free — it fires in the free product's template, beside its free sibling.

Need this built rather than just documented? See our services →