Hacked RSS not in Core (9 posts)

  1. hananc
    Posted 4 years ago #


    I have changed rss.php for some specific needs of my site.

    When upgrading to WP 3.3, my hacked rss.php it was replaced by the default one.

    I want "my" version of the RSS generating code to "live" in my theme directory so that when I upgrade again, it will not be run over to the default.

    I also want the RSS address to be as it is now so that subscribers to my feed will not have to subscribe again.

    Any idea how to do that?


    Hanan Cohen

  2. Yoav Farhi
    Posted 4 years ago #

    What changes have you made to your rss.php code?
    It most probably can be done with actions/hooks in your theme code.

  3. Rev. Voodoo
    Posted 4 years ago #

    Yup, that's why we always try to stress never editing core files, core themes (2011), etc

    We would need to know what sort of changes you are making, it can probably be done from within your functions.php file, or better yet, a functionality plugin

    As @Yoav Farhi suggests, many of the items in rss.php are pluggable and can be affected by you

  4. hananc
    Posted 4 years ago #

    In my site I use a custom field that I need to publish in the RSS feed and the title of the posts include the post category.

    I also format the post in RSS according to the design of the post.

    Here is the site http://irrelevant.org.il/ and here is the feed http://irrelevant.org.il/feed

    I will look into the functionality plugin and hope it will be able to help me.

  5. Rev. Voodoo
    Posted 4 years ago #

    Which function are you editing in rss.php?

    If we know exactly what you are editing, it would be helpful

  6. hananc
    Posted 4 years ago #

    Thank you very much for your effort to help me.

    Instead of explaining, I have uploaded feed-rss2.php at


    with markings to where I have changed the code.

    I hope it will make things clear.

  7. Rev. Voodoo
    Posted 4 years ago #

    Ah.... up at your first post, you said you'd been hacking at rss.php, which is a totally different file!

    It houses a bunch of rss functions, some of which are pluggable.

    The quickest thing I could think of in your situation is to make a totally custom feed in your theme

    And then .htaccess redirect your standard feed to this custom feed/page. Does that sound like it could work?

  8. hananc
    Posted 4 years ago #


    It could work only if on the next update, WP will not overwrite my .htaccess

    Is this advice still true?


  9. Rev. Voodoo
    Posted 4 years ago #

    Yeah, anything you add to .htaccess just needs to fall outside the WP tags. I've had manual RSS redirects on my .htaccess for years, they've never been touched

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.