• Resolved giant slayer

    (@giant-slayer)


    I am using the featured image option in my site, but the featured image is not showing up in the rss feed. Does anyone have any ideas on how to fix this?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter giant slayer

    (@giant-slayer)

    I found this post.
    https://www.ads-software.com/support/topic/342162?replies=6
    But when I added the code to the functions file. I still had no image in the rss feed.

    The feed is not receiving the call for get_the_post_thumbnail( ) nor the_post_thumbnail( )

    Any idea on how to get these working on the rss so images show up again?

    // 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;
    }

    works for me

    Thread Starter giant slayer

    (@giant-slayer)

    You put that code snippet into the functions.php?

    Thread Starter giant slayer

    (@giant-slayer)

    I put the code into my functions.php, but had no change in my rss feed.

    Where are you calling insertThumbnailRSS?

    sorry ’bout that boss, I forgot the whole function…

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

    all goes in functions.php

    Thread Starter giant slayer

    (@giant-slayer)

    I tried that, but still no image.
    I don’t see anywhere in my code anywhere in my theme where a call is being made to the_excerpt_rss or the_content_feed.

    Do you think my feed or theme is setup incorrectly?

    My site is https://theviolent.net
    and the feed is https://theviolent.net/feed

    I don’t have those calls in my theme either…. I believe those are WP functions that we are hooking into…..

    Thread Starter giant slayer

    (@giant-slayer)

    hmmmm…
    well that leaves me at a loss, scratching my head, wondering why mine is different and what I should try next.

    Thread Starter giant slayer

    (@giant-slayer)

    Anyone able to figure out how to get the images to show up in the rss feeds?

    Phil

    (@owendevelopment)

    I got the feeds with images working with the above code, but 2 things:

    1. Thumbnails are tiny – where to increase size of these JUST for the feed images

    2. Doesn’t work on category feeds (domain.com/category/feed) – only main feed domain.com/feed

    Is there no plugin available yet for this?

    Phil

    (@owendevelopment)

    Got the images appearing in category feeds now.

    Images still need to be enlarged though.

    I’ve not messed with the sizes. but are you able to change the size here:

    get_the_post_thumbnail( $post->ID, 'thumbnail' )

    where it says ‘thumbnail’ is the size. You can call one of the standard sizes listed in the codex, or possible a custom size if you use the add_image_size in your functions.php to define a custom size (I’ve not tried a custom size, just seems like it would work)

    Thread Starter giant slayer

    (@giant-slayer)

    I finally got mine working. I think it fixed after the last wordpress update.

    When I put this code into functions.php, my whole site is shut down with a white page, even the admin pages. I tried disabling all my plugins but it didn’t do anything.

    Found the problem. I was putting the code into includes/functions.php but it has to go in the functions.php found in your theme’s directory. A slight detail that seemed not to have been mentioned.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Featured Image not appearing in RSS’ is closed to new replies.