• Resolved ulricakrii

    (@ulmavi)


    Hi.

    I wonder if there is a way to get the images in every blog post to show in the RSS feed. The only time the images is shown is when I paste it directly in the blog post but then it won’t show up as an image on the start page.

    Is there a way to fix it?
    I have a food blog and to read a post you really want to see the image that goes with the recipe. ??

    Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)
  • When you write a new post look at the right side there is a field called “format” you have to choose image and then click on featured image.

    Thread Starter ulricakrii

    (@ulmavi)

    Hi.
    That is exactly what I choose. To get the images on every post on the start page I have to choose the format Image and then use the featured image. The problem is that in all the RSS feeds the images don’t show up. Only the text. The only time when a image is shown in RSS feeds is when I have put it right in the text area on a blog post (for instanse when I have more than one image to show).

    Do you know if there is a code string I have to use to let the RSS feeds include the images? Since I have a food blog the image is very important.

    Thanks.

    Same here: how can we show the featured images in RSS feeds?

    Try this. Place the following code in functions.php file. I have it at the end of the page.

    function rss_thumbnail($content) {
    global $post;
    if(has_post_thumbnail($post->ID)) {
    $content = ‘<p>’.get_the_post_thumbnail($post->ID).'</p>’.get_the_content();
    }
    return $content;
    }

    add_filter(‘the_excerpt_rss’, ‘rss_thumbnail’);
    add_filter(‘the_content_feed’, ‘rss_thumbnail’);

    @izabela B: Thank you contributing to the forums but please do not encourage people to edit theme files directly. At best, they will lose all of their changes when they update the theme. At worst, they could bring their site down. They should be recommended to create a child theme for their changes.

    I’m sorry, I did not know about the risks. I found this on the internet and I applied myself. Maybe I should delete my post? But I do not know how? Or please do so. Thank you.

    You can put all snippets, that are destinated for the functions.php of your theme into this plugin instead:

    https://www.ads-software.com/plugins/code-snippets/

    This has the advantage, that you can export all your snippets and transfer them to other installations or themes and adapt them there to your need.

    I found another solution to show the featured images in RSS feeds with more features:

    https://www.ads-software.com/plugins/featured-images-for-rss-feeds/

    Thread Starter ulricakrii

    (@ulmavi)

    Thanks. I will try this plugin and see what happens. I let you know if it’s what I’m looking for. ??

    Thread Starter ulricakrii

    (@ulmavi)

    Yey! It worked! Thank you so much.

    /Ulrica

    Thread Starter ulricakrii

    (@ulmavi)

    This is resolved.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Images won't show in the RSS reader’ is closed to new replies.