Feed themes? (4 posts)

  1. JonRosebaugh
    Posted 10 years ago #

    Is there a way to have the feed be a little different for a theme? Like, I have a favicon.ico in one of my themes, and I use that for the site by having the line <link rel="shortcut icon" type="image/x-icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" /> in my theme. I want to do the same thing for my rss feed, but I don't want to just edit the global wp-rss2.php file, in case I ever want to switch to another theme or something. Can I put wp-rss2.php in a theme?

  2. dss
    Posted 10 years ago #

    If you are saying that you want to style the output of your RSS Feed, so that it looks nicer, I'm right there with you.


    In wp-rss2.php there is php code defining the header of the output for the feed:

    header('Content-type: text/xml; charset=' . get_settings('blog_charset'), true);
    $more = 1;


    personally i couldn't determine how to add anything into that string.

    However, i did notice that adding the xml?tags enclosed in php echo tags might actually work.

    <?php echo '<?xml-stylesheet type=&quot;text/css&quot; href=&quot;http://you.com/rss.css&quot; ?>'; ?>

  3. dss
    Posted 10 years ago #

    I got this working and wrote it up here

  4. JonRosebaugh
    Posted 10 years ago #

    No, that's not really what I want.
    I want to have wp-rss2.php included as part of a theme. So the small changes I make to it will be enabled when that theme is enabled, and disabled when the theme is disabled.

Topic Closed

This topic has been closed to new replies.

About this Topic