Since I changed themes here I’ve been using featured images a lot more on posts. 1

There are a couple of things that bother me about WordPress featured images, the fact they do not show up in an RSS feed and that any attribution needs to go in the body of the post.

This morning I read Transforming Photo Attribution from Credit to Stories on Alan’s blog, which mentioned these problems while discussion a much more important one.

I though I’d see if it was easy enough to find a fix and headed to google.

First I found a few plugins but also some DIY advice. I decided that these looks simple enough for me.

Featured Images in RSS

How to Show Featured Image in WordPress RSS Feed shows how to do just that. You need to edit the functions.php file in your blogs theme 2.

All I needed to do was copy the code suggested from that site and add it to the bottom of my functions.php file which I already had in my child theme. The post shows how to edit this file via the WordPress dashboard. I do this with my ftp application.

A quick look at my feed in Forefox (Safari dos not show RSS any more 🙁 ) or
Looks good.

Captions for featured images

Again there are plugins for this, but I found:
How to add caption to the featured images in WordPress which had done the trick.

This uses the built in caption from the media library. To do this I needed to copy the content-single.php file from the theme to my child themes folder. I then edited that one.

My theme’s code was slightly different to the example but it was easy enough to figure out where the code for the featured image/thumbnail was and add:

<?php if ( $caption = get_post( get_post_thumbnail_id() )->post_excerpt ) : ?>
    <p class="featuredcaption"><?php echo $caption; ?></p>
<?php endif; ?>

After it. I also added a bit of css to the child themes styles.css file to align the text right. I’ll think about how to make that better looking….

What I particularly like is that this approach uses the built in WordPress caption for the image. When I started thinking about it I was thinking about adding a custom field and complexity. I keep finding that WordPress is already half way to do what I want, if only I knew where to look. Until I do google will keep me right.

  1. I choose the theme because it supports indyweb features I wanted to test. I’ve still not got my head round many of them.
  2.  This just works if you can edit your theme, so you would need a self hosted blog. I use a child theme here which should avoid changes being overwritten if the them is updated.Child Themes « WordPress Codex covers the details

4 thoughts on “Tinkering with WordPress Features

  1. Thanks for figuring this out, John. I am thinking it might be easier for ordinary folks to add the code for the featured RSS via a plugin?? It’s something I find confuses people in a syndicated class, because they added their image to WordPress, but featured images exist outside of the RSS.

    If you don’t figure it out, I might 😉

    Oh never mind, it’s been done!

    It wont help my current group of students because they are in[promise]

  2. Hi Alan,

    Thanks, both things seem to have plugins that fit.
    I was confused myself by the lack of featured images in RSS.
    Certainly that would be the simplest thing for folk to do.
    It just seemed like slightly more fun and educational for me to DIY;-) Your post reminded me I had an itch to scratch.

  3. Much puzzlement happens in setting up syndicated hub web sites with Feed WordPress, and one of the main tripping points is dealing with featured images.
    In many modern WordPress themes, these are what are used to generate those nice pretty front pages of sites, where each post is represented by a photo/image, or used to put posts into a slider, or to represent the posts in an archive listing.
    How they work varies form theme to theme. In some themes, the featured image is also inserted into the body of post itself when published, in others it is shoved atop the post, in others you never see it except where used as an indicator outside the post.
    The the average author, it is part of a post. They added it while editing.
    However, featured image is a WordPress specific feature and not part of an RSS Feed- the things that go into the feed are title, link, author, date, and the post content.
    On the current theme of my blog, featured images are used on the front page, and appear atop my posts, but they are technically not included in the post content.
    The Featured image looks like its part of my post, but its not part of the RSS feedBrowsers do make it harder to even see your RSS feed- Safari just coughs and ways WTF? and Chrome shows you a blitz of code. But to see a human view, this is how my post looks as rendered by Feedburner (used for show only)
    Content of my RSS feedThat featured image of Ike and Tina are not part of the mix.
    “So what?” someone like Sandy might ask.
    And it’s a good question.
    When we build a connected course (see Feed WordPress 101 for more nuts and plenty of bolts), we often too want to make use of themes that display syndicated posts with featured images. Except, none exist for these posts.
    So we use an end around. You can use a plugin that looks for the first image found in a post, and makes it a featured image. It might not be perfect, but better than nothing. In the past I used Feed WordPress Advanced Filters to do this, but lately I have been using the FWP SIC’ EM one created by the author of Feed WordPress.
    I put this into play recently for the New Media course I am helping with this month in Puerto Rico at Universidad del Sagrado Corazón. It’s always a few steps from perfect.
    Mainly because students author their posts, add a featured image, and none comes with their syndicated post (because of the issue above, featured images are not part of RSS feeds). We’ve tried telling students to include at least one more image in their post. Sometimes you end up with some other image that is in there. But we are getting most of them.

    John Johnston just blogged this morning (well I read it in the morning, likely it was his wee hours as he says with the Scottish brogue) about some things he experimented with to add featured images into the RSS feed. I had been pondering that for a while, but he got around to it first.
    However, I doubt few people are going to figure out how to add code to functions.php in their theme. It would be easier to do via a plugin… and as usual in WordPress WCIWSAD (Why Code It When Someone Already Did)… I found two plugins that take care of this issue.
    I opted for the latter one (it had more uses listed, and it mentioned working well on multisites), enabling it on this here blog, and using the settings to embed the medium sized image (in my theme that’s 620 pixels wide).
    So now that same feed has inserted at the top of it, my featured image, because the plugin modifies the RSS feed to shove it in at the to of the feed.
    Now my feed has featured images inside of it!To recap, this is a two sided approach:
    Plugin on source WordPress blogs use plugin to add featured image to RSS Feed.
    Syndicating hub site uses plugin to convert first found image to be featured image,
    Of course, this plugin has little use for people using (easy and free means you cannot add plugins) nor for people using other platforms (75% of the web?).
    Still, if I was running a multisite and hosting blogs for others, I would network enable Featured Images in RSS w/ Size and Position*
    I bet many are still puzzled….
    * If multisite is set up to create blogs by domain name and using directory structures, the images are already local on the server, and you can use an Auto Featured Image plugin that makes a featured image out of the first local image it finds.**
    ** Look at me, Tom, doing footnotes!
    Top / Featured Image: Started with a CC0 image of puzzle pieces found on Pixabay. I use the majic wand in photoshop to select the interiors, and then Edit -> Special -> Paste into to insert various pictures in the pieces. Top left is my own CC licensed photo of a cactus , top right and bottom left ore CC licensed logos for WordPress and RSS, bottom right is a screen shot of the WordPress editing interface. I then selected the space around the pieces, and deleted the white. In the bottom layer I use the Photoshop Filter -> Render -> Clouds to make clouds.
    The post “The Puzzle: Shoving That Featured Image Inside Your RSS Feed” was originally assembled from spare parts of a 1957 Chevy at CogDogBlog ( on February 15, 2016.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.