WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How Do I style/format my RSS feed? (4 posts)

  1. joatblog1
    Member
    Posted 2 years ago #

    Here's an example of a site who's RSS feed looks great: theminimalists.com.

    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?

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    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

  3. vjpo
    Member
    Posted 2 years ago #

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

  4. AndyiBM
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic