benecaster_archive_header_description
Filters the archive subheading/description text rendered in archive/header.php.
Return a string. Cast with (string) and output through wp_kses_post(), so HTML is allowed (post-level tags only).
Note the asymmetry with benecaster_show_header_description, which looks like the same filter on the sibling template: that one also runs wpautop(), this one does not. Plain newlines returned here stay as newlines and collapse in the rendered HTML — emit your own <p> tags.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$description |
string |
— | Archive description text |
$show_id |
int |
— | ID of the show |
Returns:
string
Example
add_filter( 'benecaster_archive_header_description', function( $description, $show_id ) {
// Append a subscriber-count teaser to the archive description.
$count = benecaster_get_subscriber_count( $show_id );
if ( $count > 0 ) {
$description .= ' Join ' . number_format( $count ) . ' listeners.';
}
return $description;
}, 10, 2 );
Affects
- archive/header.php template part