WordPress.org

Ready to get started?Download WordPress

Forums

Fetch RSS with Thumbnail (6 posts)

  1. Marc P Gangmei
    Member
    Posted 4 years ago #

    Can I fetch RSS with thumbnail?

    I have two blogs, one on my main domain and another on a sub domain.
    I want to pull content with thumbnail from the sub domain blog and display it on my main domain blog.

    I know how to fetch the content only but not with the Thumbnail.

    Can anyone help me out?

  2. Marventus
    Member
    Posted 4 years ago #

    Hi weblogian,

    I found this relatively new plugin called Feed Thumbnails that supposedly allows you to enclose thumbnails in your RSS feeds.

    According to the author, "the plugin supports the Post Thumbnail feature built into WordPress and the Get The Image plugin by Justin Tadlock."

    However, please note that it only works on WP 2.9 and above.

    Hope this is helpful. Cheers!

  3. Rev. Voodoo
    Volunteer Moderator
    Posted 4 years ago #

    http://cdharrison.com/2009/12/16/the_post_thumbnail-for-rss-feeds/

    to do it sans plugin
    (I never thought of doin it.....thanks for the inspiration to find that!)

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

    // THIS INCLUDES THE THUMBNAIL IN OUR RSS FEED
    function insertThumbnailRSS($content) {
    global $post;
    if ( has_post_thumbnail( $post->ID ) ){
    $content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail' ) . '' . $content;
    }
    return $content;
    }
    
    add_filter('the_excerpt_rss', 'insertThumbnailRSS');
    add_filter('the_content_feed', 'insertThumbnailRSS');

    in functions.php
    (note...I changed the word medium to thumbnail for size....I didn't like how the medium size pics looked in my feed)

  5. Marventus
    Member
    Posted 4 years ago #

    Hi RVoodoo,

    I had never thought of doing that either. Even though I don't know a lot about php, your solution looks pretty elegant.

    I hope it works for weblogian.

  6. Marc P Gangmei
    Member
    Posted 3 years ago #

    Thank you all for the great responds.
    I end up doing this
    Integrating WordPress with Your Website
    http://codex.wordpress.org/Integrating_WordPress_with_Your_Website

Topic Closed

This topic has been closed to new replies.

About this Topic