Post Pic

Get rid of auto media enclosures on your WordPress blog

When you’re adding a multimedia file as such as a mp3 or flv file, WordPress automatically create a custom field named enclosure and add the media url to your rss feed. Great for podcasters, but unusefull for most bloggers. Let’s see how to get rid of it.

Just paste the following lines of codes within your functions.php file, and then, say goodby to automatic enclosures!

function delete_enclosure(){
    return '';
}
add_filter( 'get_enclosed', 'delete_enclosure' );
add_filter( 'rss_enclosure', 'delete_enclosure' );
add_filter( 'atom_enclosure', 'delete_enclosure' );

Thanks to Kny for this great recipe!

Related Posts

Related Posts

No related posts.

Leave a Comment

* Name, Email, Comment are Required