[resolved] How to create a custom feed template? (3 posts)

  1. jfix
    Posted 9 years ago #


    I am trying to create a custom feed on the basis of the existing feeds (wordpress/wp-[rss2|atom|rss|...].php), but I am having trouble integrating it into wordpress so as to make it available through http://example.com/?feed=myspecialfeed

    I have currently simply copied the wp-rss2.php to wp-myspecialfeed.php, and found the functions do_feed_* in wp-includes/functions.php, and added my own function do_feed_myspecialfeed, but apparently this is not enough.

    Could somebody please tell me what else is needed to create a custom feed? Thanks in advance,


    http://codex.wordpress.org/Customizing_Feeds does only say

    "There are a variety of ways to customize your feeds, through the use of third-party software you install and add-on to your WordPress site, or by manually changing the feed templates to meet your needs."

    which is not really illuminating ;-)

  2. jfix
    Posted 9 years ago #

    I have just found that in rewrite.php, there is also a need to add myspecialfeed to the known feeds in $feeds in line 220, and to the $default_feeds on line 704 ff.

    However, http://example.com/?feed=myspecialfeed still doesn't output anything.

  3. jfix
    Posted 9 years ago #

    Oh well, it is much easier and obvious to call the created template directly, like this:


    This is resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic