• Resolved TheSupercargo

    (@thesupercargo)


    I am trying to put a thumbnail image into my RSS feed.

    I have a daily photoblog. Thumbnails are available, but currently the RSS feed only displays the full-size Featured Image.
    gbg365.thesupercargo.com/feed/

    This hasn’t been a problem till now. Now I am trying to include a link from another website to GBG365 using the RSS feed to show the latest post. I want the link to show the image thumbnail plus the WP extract for the post.

    The relevant page at my other website (under construction) is https://360.thesupercargo.com/home-2/

    If I use Jetpack’s Display WordPress Posts widget, I can only get the error message: We cannot load blog data at this time. (Jetpack is enbled on both GBG365 and on the 360 blog. “Show featured image” and “Show extracts” are both checked.)

    If I use the Super RSS Reader widget with “Show description” and “Show thumbnail if present” checked, I only get text.

    If I use the RssFeedWidget I get the text plus a segment of the full-size image.

    (See https://360.thesupercargo.com/home-2/ for these results.)

    I have searched on WP Forums and on the net and find all sorts of advice. The most commonly repeated advice is to include this code (or something like it) in my functions.php file…

    function rss_post_thumbnail($content) {
    global $post;
    if(has_post_thumbnail($post->ID)) {
    $content = '<p>' . get_the_post_thumbnail($post->ID) .
    '</p>' . get_the_excerpt();
    }
    return $content;
    }
    add_filter('the_excerpt_rss', 'rss_post_thumbnail');
    add_filter('the_content_feed', 'rss_post_thumbnail');

    I have done so (I’ve tried several variants), but it doesn’t seem to do any good. Obviously it works for many people, but not for me. Clearly there must be something else I need to do somewhere, but I’m not a programmer and one alternative I tried from a WP forum entry crashed my whole GBG365 website. Can anyone advise?

    I am running WP 3.8.1. My theme (on the source site, GBG365) is by Photocrati – again, up to date (but I no longer have their support), with 11 active plug-ins. My theme (on the target site, 360) is the free versionj of Snapshot by SiteOrigin with 2 active plug-ins.

    My websites are all hosted by Binero.se (I live in Sweden).

    With thanks,
    John

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter TheSupercargo

    (@thesupercargo)

    OK. No one’s offered any comment and I’m still looking. I found this thread from 3 years back:
    https://www.ads-software.com/support/topic/thumbnailsfeatured-images-in-rss-feed-in-30?replies=15

    Rev.Voodoo‘s code – put into the originating site theme’s functions.php – works in the sense that it gets the RssFeedWidget to show a thumbnail. But it doesn’t alter the behaviour of either Jetpack’s Display WordPress Posts widget or the Super RSS Reader widget.

    I’ll leave this as ‘unresolved’ and won’t change the reference page at https://360.thesupercargo.com/home-2/ for a week longer.

    For anyone interested, Rev.Voodoo’s code is:

    // 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');

    Thread Starter TheSupercargo

    (@thesupercargo)

    No one seems to want to add anything so I’ll mark this ‘resolved’ … though it really isn’t.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Thumbnail images won't dislay in RSS feed’ is closed to new replies.