Put an episode’s transcript on any page, and tell locked-out visitors how to read it
Show a transcript beside a player on a landing page, a short preview in a blog post, or a scrolling read-along under an embedded episode, with benecaster_transcript. The shortcode applies the transcript visibility itself. A visitor it excludes sees nothing while the show’s teaser is off (the default), or the teaser the podcaster chose: a notice, or a notice after up to 5 lines. Change or replace it with benecaster_transcript_locked_html. In full and scrollable modes, a visitor who may read the transcript also gets its download links, and a formatted transcript prints as paragraphs of span.benecaster-transcript__line rather than list items.
- Click-to-jump and follow-along need that episode’s player on the same page; without it the timestamps are plain links.
- On an episode page, leave
episode_idout to use the episode being shown. The episode page already shows the transcript below the show notes, and leaves it out when the notes carry the shortcode. - The locked filter is never asked for a Hidden transcript, and is given the transcript’s lines only when the podcaster chose to show them. Return
''to remove the teaser.
Code
<?php
// A five-line preview, linking to the episode page for the rest:
echo do_shortcode( '[benecaster_transcript episode_id="42" mode="preview"]' );
// A read-along box that follows the player on the same page:
echo do_shortcode( '[benecaster_player episode_id="42"][benecaster_transcript episode_id="42" mode="scrollable"]' );
// Visitors the visibility excludes: a sign-up note instead of nothing.
add_filter( 'benecaster_transcript_locked_html', static function ( string $html, int $episode_id ): string {
return '<p class="my-transcript-locked">' . esc_html__( 'Members can read along with every episode.', 'my-theme' ) . '</p>';
}, 10, 2 );
Hooks Used
Need this built rather than just documented? See our services →