Add something below the show notes on every episode page, even when the notes are empty
Print your own block under the show notes on every episode page, such as a sponsor credit or a link to a transcript. It appears even on an episode with no show notes and on a locked episode with no teaser. The example prints a sponsor note saved on the episode, and only to visitors who can open the episode.
It uses benecaster_after_episode_content_area, which Benecaster fires straight after the content area on every episode page, whether or not the visitor can open the episode and whether or not it has body text or a teaser.
Why not benecaster_after_episode_content
benecaster_after_episode_content wraps the content block, and is skipped when the teaser or the full content is empty. An episode with no body text, or a locked episode with no teaser, never fires it, so whatever you hang on it goes missing on exactly those episodes.
Check access yourself
The action fires for visitors who cannot access the episode too. $can_access is the real access check, so test it before printing anything a locked visitor should not see, as the example does. A theme that overrides the episode page template must fire the action itself.
Code
<?php
add_action( 'benecaster_after_episode_content_area', function ( int $episode_id, int $show_id, string $user_tier, bool $can_access ): void {
if ( ! $can_access ) {
return;
}
$note = get_post_meta( $episode_id, 'my_sponsor_note', true );
if ( $note !== '' ) {
echo '<aside class="my-sponsor-note">' . esc_html( $note ) . '</aside>';
}
}, 10, 4 );
Hooks Used
Need this built rather than just documented? See our services →