There’s no filter in SSP for that, but you could theoretically filter the excerpt using the get_the_excerpt filter. The problem there is that the only parameter available to that filter is the excerpt itself and not the post ID or any other identifying data.
I’ll see if I can improve the feed template here, but that will only be in the next release.
Cheers,
Hugh
Thanks Hugh, here’s a quick workaround.
/**
* Set the podcast title as the excerpt, so it gets used for the itunes:subtitle field
*/
function gc_podcasts_use_title_as_excerpt() {
global $post;
if (is_feed() and $post->post_type == 'podcast') {
return $post->post_title;
}
}
add_filter( 'get_the_excerpt', 'gc_podcasts_use_title_as_excerpt' );
I’m good to go, so there’s no need to update your plugin.
Great stuff – that snippet looks good, but there’s only one change that I would recommend as a better way to check if you are viewing the podcast feed specifically. You’ll also need to return the default value even if the conditional fails, so here’s the updated code:
/**
* Set the podcast title as the excerpt, so it gets used for the itunes:subtitle field
*/
function gc_podcasts_use_title_as_excerpt( $excerpt ) {
if ( is_feed( 'podcast' ) ) {
global $post;
$excerpt = $post->post_title;
}
return $excerpt;
}
add_filter( 'get_the_excerpt', 'gc_podcasts_use_title_as_excerpt' );
Cheers,
Hugh