Skip to main content

benecaster_get_episode_description()

Show / Episode Description Free
benecaster_get_episode_description( int $episode_id ): string

Returns an episode’s description — the text that appears in podcast apps — for use in theme code, template overrides, and add-ons.

Use it rather than reading the episode’s post meta directly. The meta key is internal, and reading it raw skips the filter that the shortcode and the RSS feed both apply, so your output can silently disagree with what listeners actually see.

Parameters

Name Type Default Required Description
$episode_id int Yes WordPress post ID of the episode.

Return Value

Type: string

The episode's description as raw text, after filtering. Returns an empty string when the episode has no description set.

Example

$description = benecaster_get_episode_description( $episode_id );
echo esc_html( $description );

Hooks Fired

Notes

The return value passes through the benecaster_episode_description filter.

This returns raw text, not HTML. To alter the rendered markup of the shortcode instead, use benecaster_episode_description_output.

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