Search code examples
wordpressrsspublish

Have wordpress add to existing external RSS feed when publishing


I have a RSS feed in an XML file at the root level. I have a php script that adds to the xml when ever i want to add to it. Is there a way to have wordpress add to that RSS feed every-time publish a blog post?


Solution

  • Yeah, that'd be no problem so long as you can parse the XML and then append nodes to it (XML docs are not as straight forward as, say, doing a file_put_contents() to append to the doc).

    One way to do this would be to hook onto the edit_post action and do your update in the callback function.