WordPress.org

Support

Support » Plugins and Hacks » Modify feed content

Modify feed content

  • I’ve just started to get into writing plugins, and I have an idea for one that involves modifying feed data before it is printed. Currently it works properly with the real posts, but I can’t make it work with feeds. The whole premise of the plugin is to work with FeedBurner, but I can’t even get it to work with the actual wordpress feed (which I believe FB taps into).

    The filter for the post itself is add_filter(‘the_content’, PLUGIN-NAME);
    When I tried add_filter(‘the_content_rss’, PLUGIN-NAME); it doesn’t seem to modify anything.

    Any suggestions?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Is your feed only publishing excerpts, not the content? Do you have other feed plugins active?

    Turns out that FeedBurner must use a cache system or something. I left it as the_content and now it’s good.

    I have the reverse question. I have a plug-in that shouldn’t be applied to RSS feeds but only to regular queries. I am using add_filter('the_content') currently.

    you could use the is_feed function for that (find documentation here).

    For example:

    function st_myFunc ($content) {
       if ( is_feed() ) return $content;
    
       // do stuff
    
       return ($content);
    }

    I’m sure there are better ways 🙂 But that worked for me…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Modify feed content’ is closed to new replies.
Skip to toolbar