Support » Fixing WordPress » How Do I style/format my RSS feed?

  • Resolved joatblog1


    Here’s an example of a site who’s RSS feed looks great:

    They use Feedburner, which is what I’m using also, so I figure I should be able to produce the same results. Notice when you click on their rss button and go to their feedburner feed page. The post is nicely separated into paragraphs and subheadings, with subheaders bolded and everything (formatting looks exactly the same as on their site). With my feed, it’s all together, so it looks like this:

    “Hi there. This is the first paragraph. Bold Subheader. So, here is the second paragraph.”

    rather than like this:

    “Hi there. This is the first paragraph.

    Bold Subheader
    So, here is the second paragraph.”

    Maybe it’s Feedburner?
    Maybe I need to style my XML somehow (no idea how to do that)?
    Maybe it’s my plugin and I need to find one that renders a nicer looking feed?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You can’t style RSS feeds at all, they are simply raw data

    However, in feedburner you can set up what you see

    I believe in feedburner, you have to go to the old interface (should be an option up at the top)

    Then I believe under the optimize tab you turn on browse friendly

    That only really works for people who view your feed in the browser. If people see your feed in an RSS reader, it will be styled however the reader handles it

    It’s possible to apply some styles to feeds by the plugin Feed Styler.

    I have styled RSS feeds in the function.php like this:

    function rss_post_thumbnail($content) {
    global $post;
    $thumbcontent = '';
    if (has_post_thumbnail($post->ID)) {
    	$thumbcontent = ''.'<div style="float:left;margin:0 10px 5px 0;"><a href="' . get_permalink( $post->ID ) . '">' . get_the_post_thumbnail($post->ID,'thumbnail') .	'</a></div>';
    $thumbcontent = $thumbcontent . '<div><span>' . get_the_content() . '</span></div><a style="margin:5px 0 0;" href="' . get_permalink( $post->ID ) . '">Continue reading...</a>'.'';
    return $thumbcontent;
    add_filter('the_excerpt_rss', 'rss_post_thumbnail');
    add_filter('the_content_feed', 'rss_post_thumbnail');

    It works fine, except that it repeats the post title (as plain text) before the excerpt. Still looking to get rid of that bit.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How Do I style/format my RSS feed?’ is closed to new replies.