Using CSS to style my RSS 2.0 feed
-
I came accross this page:
http://starvingartist.stanleysy.com/archives/2004/july/safarithemedrssandatomfeedswithcss/
It explains how to use a CSS stylesheet and a few images to style an RSS or Atom feed in the browser.
I had a go at editing my wp-rss2.php file, adding the stylesheet declaration directly below the xml declaration:
<?xml-stylesheet href="feed.css" type="text/css"?>
The rest of the file was unchanged, and none of the php code was affected by the edit.
This broke the feed.
An RSS validator identified two errors:- Feeds should not be served with the “text/html” media type
- line 1, column 0: XML Parsing error: <unknown>:1:0: no element found
I’m mystified, as the content type is set explicitly on the page to text/xml, unchanged from the original version.
Can anyone throw any light on this?
(I’m running WP 1.2, PHP 4.3.5, IIS, Windows 2003 Server).
Thanks.
The topic ‘Using CSS to style my RSS 2.0 feed’ is closed to new replies.