Forums

How do I remove enclosure urls from rss feed? (2 posts)

  1. zimen
    Member
    Posted 1 year ago #

    Is it possible to do it via functions.php?

    I use wpaudio which lets me hide the urls from the blog but these still appear in the rss feeds.

    I'd really like to know if there's a way to remove or hide them.

    Can anyone help me please?

    Thank you very much

    Simon

  2. bpmildh
    Member
    Posted 4 months ago #

    Found a sollution on this problem here:
    http://www.livexp.net/wordpress/get-rid-of-auto-media-enclosures-on-wordpress.html

    It's from 2009 but I use it on 3.3.1 and i still works

    Simply put this in functions.php:

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags