benecaster_show_header_description
Filters the show description rendered in show/header.php.
Return a string. Cast with (string).
Unlike the other header fields, this one is output through wp_kses_post( wpautop( $description ) ), so HTML is allowed (post-level tags only — <script> is stripped) and plain newlines are converted to paragraphs for you. Double-wrapping your own <p> tags is the usual mistake. Returning an empty string renders an empty description block rather than omitting it.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$description |
string |
— | Show description HTML |
$show_id |
int |
— | ID of the show |
Returns:
string
Example
add_filter( 'benecaster_show_header_description', function( $description, $show_id ) {
// Append an awards badge HTML when the show has won an award.
$award = get_post_meta( $show_id, '_show_award_badge', true );
if ( $award ) {
$description .= ' <span class="show-award-badge">' . esc_html( $award ) . '</span>';
}
return $description;
}, 10, 2 );
Affects
- show/header.php template part