benecaster_get_show_description()
benecaster_get_show_description( int $show_id, string $type = 'short' ): string
Returns a show’s description for use in theme code, template overrides, and add-ons. Prefer it over reading the underlying post meta directly: the meta key is internal and may change, and reading it raw bypasses the filter every other consumer honours.
The same value reaches the RSS feed, so what you read here is what subscribers’ podcast apps display.
Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
$show_id |
int |
— | Yes | WordPress post ID of the show. |
$type |
string |
'short' |
No | Which description to return. 'short' is the summary that feeds the RSS channel description and itunes:summary; 'full' is the show's long-form body content. |
Return Value
Type:
string
The show's description as raw text, after filtering. Returns an empty string when the show has no description of the requested type.
Example
$summary = benecaster_get_show_description( $show_id );
$body = benecaster_get_show_description( $show_id, 'full' );
Hooks Fired
Notes
The return value passes through the benecaster_show_description filter, which is shared with the [benecaster_show_description] shortcode and the RSS channel tags. A filter callback that changes the short description therefore changes the feed as well.
This returns raw text, not HTML. Escape it at the point of output.
Need this built rather than just documented? See our services →