You can add this part into your function:
$audios =& get_children('post_type=attachment&post_parent=".$post->ID."&post_mime_type=audio' );
foreach ( $audios as $id => $audio ){
$content.='<a href="'.wp_get_attachment_url($id).'" target="_blank">'.$audio->post_title.'</a> ';
}
to add audio links into your feed content.
I’m using get_children()
here, you can read more about it here:
http://codex.wordpress.org/Function_Reference/get_children
Edit:
Here is the whole function:
function featuredtoRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content="" . get_the_post_thumbnail( $post->ID, 'topImage', array( 'style' => 'margin:0 auto; border: 1px solid #555; display:block;' ) ) . '' . $content;
}
$audios =& get_children( 'post_type=attachment&post_parent=".$post->ID."&post_mime_type=audio' );
foreach ( $audios as $id => $audio ){
$content.='<a href="'.wp_get_attachment_url($id).'" target="_blank">'.$audio->post_title.'</a> ';
}
return $content;
}
add_filter('the_excerpt_rss', 'featuredtoRSS');
add_filter('the_content_feed', 'featuredtoRSS');