- Description: This puts images or videos into your feeds through the use of custom fields. You can alter the custom field Keys and what is displayed.
- Version 1.0.1 Beta
- License: GPL
- Download Plugin ([download#13#hits])
About this plugin
One of the things I wanted to accomplish in the subscribe to the feed now.
After completing work on the Matt Mullenweg’s plugin, Adsense for Feeds, the other day. Basically, I took that script and made it display custom fields instead of ads.
Right now, it’s still in beta, and I’m sure I’ll work on it more. I just wanted to put this out there for those using the theme. Other than those using my themes, I’m sure this might come in handy if you like tinkering with PHP or use a lot of custom fields on your site.
The plugin was created to be modified. There’s no clear way to make this a “one-size-fits-all” plugin because I have no way of knowing what or how you’d want to display your content in your feed.
Using the plugin
You need to upload the “custom-fields-for-feeds” folder to your WordPress plugins folder. Then activate it from your WordPress administration panel.
To use this plugin out of the box, you must do a few things. First, you must know how to ” title=”How to add videos to your WordPress sidebar”> adding videos. It explains a lot.
If you’re using “Image,” “Feature Image,” or “Thumbnail,” it wouldn’t hurt to follow this tutorial on Using custom fields guide from the WordPress Codex.
Feel free to push this plugin to its limits. This is really just a starting point. I’d love to hear your ideas on how to develop this plugin into something more powerful.
Once I click the “Publish” button, we’ll see if this thing is working. I hope my image shows up in your feed reader.
Update: The plugin definitely works.
Justin, I need to thank you heartily for this. I actually don’t know that I’d ever use this plugin as is, but it finally got me to work on fixing the RSS feed for my link blog (I entered it as “Website”). Thanks to this the primary page I’m linking to in the title of each post–which I use a custom field for–shows up in the feed.
The solution’s not as elegant as I might like, but it works and is a step in right direction. And I’m certain that if your post hadn’t shown up in my feed reader today I wouldn’t have worked on it anytime soon. So, thanks.
Awesome! You finally did. Thank you so much! 😉 I’ve been waiting for someone to do this. Good job.
David
Thanks. As you mentioned, the solution isn’t elegant, but it works. I’d really like to push it a bit farther, so I’m sure I’ll be testing different things out on this blog. Please share anything you’d like to see or any other ideas you have.
Donalyza
Yeah, I finally got tired of my images not showing up in posts and just happened to come across Matt’s plugin. I couldn’t believe how simple it was to integrate the two concepts.
I will surely need this and use this one. Great work!!! Really…
Noli
Thanks. I’d love to see more people using it. It’ll give me motivation to continue building on it. 🙂
Hi Justin,
I’m using a different theme (Showcase by WPDesigner) which also works with custom fields to show images. I’ve installed and activated your plugin and changed the thumbnail line to
$image = get_post_meta($post->ID, 'Thumbnail Full', $single = true);
to reflect the name of the custom field that I’d like to use but no image (or even the missing alt text message) shows up in my feed.Do you know if your plugin may have a conflict with any other plugins, or any reasons why it may not be working on my blog?
PJ
It’s hard to say without actually looking at the theme’s code, and I can’t do that because of the license restrictions. As far as I know, there are no conflicts with other plugins.
You should definitely run some tests on a local version if you’re modifying the code though. I would never suggest editing a plugin without testing it locally before uploading it online. You can at least publish as many posts as you want to see if it’s working correctly. Also, did you publish a new post after you installed the plugin?
Thanks for replying, Justin. I’ve published a few posts whilst the plugin’s been running, with no success.
I didn’t really change the plugin code though, I just changed the “Thumbnail” field to “Thumbnail Full”, which is the custom field I needed for my blog.
I’ve never really thought about installing a local version on my computer, but it sounds like a helpful tip. I’ll let you know if I have any success with that.
PJ
Another blogger pointed out that his images weren’t showing up either, but he doesn’t have any content in his posts. He only uses custom fields. So, I’ve updated the plugin, but you can just add this code:
Below this in “custom-fields-for-feeds.php”:
Maybe that’ll help.
I think everyone should run a local copy on their computer, especially before using a new theme or plugin. Things can really screw up if you just upload things to your site. There are several tutorials on how to do this, but I’ve used Tamba2’s Xampp tutorial before. It might take a little patience setting it up, but it’s well worth it.
It really comes in handy when testing things with custom fields because you don’t get a second chance after hitting that publish button with your real blog.
PJ
Actually, just ignore the code above. I thought there was a problem when there’s no content, but it seems to be working for me on my local version without the extra line.
i loved that custom fields. i never seen an usage of custom fields like that. You did a good job.. Thanks a lot !
Huseyin
It was actually pretty simple once I saw that AdSense for feeds plugin. I’d been searching for a decent solution before it magically appeared.
In using this plugin with the Options (Light) theme it doesn’t seem like videos are being included in the feed from the custom fields?
The videos appear perfectly on the site (home page and postings) but are missing from the feed itself, however pictures are working fine.
Could this be because I’m only including the videos via the custom fields when writing a new post and not placing the full embedding code into the post body? It seems like that would cause a double instance of the video on the postings pages, but I figured I’d ask.
Thanks
Hey Justin, first off… Great Plugin!
However… I can’t seem to get it work. I have a key named Thumbnail and I have my image path correct in the value. In fact, I didn’t even touch your plugin at all. I just activated it. I have the FeedSmith Plugin and the Custom Field GUI plugin installed with this plugin. I don’t have any other plugins that would seem to affect it. Are there issues with these plugins that would make your plugin not work?
Justin, I just wanted to leave an update to my earlier comment about videos not showing correctly. I’ve set my feed to run through Feedburner and now the videos are showing in the feed properly.
I didn’t make any other changes, so either it was just some odd glitch or maybe there’s something in how WP version 2.3.3 handles the feed output that you might want to look into. I’m not sure but just wanted to mention it for your benefit.
Great plugin (and theme in Options), thank you so much!
RickRi
I’m not sure. I’ll have to look into it. I’m using the FeedSmith plugin on this blog and it works. Also use the Custom Field GUI on my test blog.
Scott
Thanks for the update. I quickly updated the plugin for the Options theme because it was originally for Structure only, so I need to do a little more testing to be sure it’s functioning as expected.
I use Feedburner on this blog but just the standard WordPress feed through my test bog. Both seem to work for me. Like I said though, I still need to do some testing with the Options theme to make sure all the custom fields are getting through.
well, i don’t have any content in the post, just two custom fields. is this a problem, i know you said to an earlier comment that it wasn’t??
Sorry for posting so many times but I just wanted to add the php that I have to see if it’s right or not. Here it is…
ID, ‘Thumbnail’, $single = true); ?>
Thanks again for any help, I’m starting to go crazy over this.
<codeID, ‘Thumbnail’, $single = true); ?>
Ahhh…. I’m soooo sorry for posting so many times. I didn’t use the “code” tag. You can delete those posts if you want.
Anyway, here is the php code that I’m using.
ID, 'Thumbnail', $single = true); ?>
echo $image = get_post_meta($post->ID, ‘Thumbnail’, $single = true); ?>
I’m really sorry for posting so many times, but I really want this plugin to work for me. I just can’t seem to get the thumbnails to show in my feed. I’m getting desperate here.
Hello Justin
I need to put any character in my content area to show custom fields data in feed reader.
Must be somewhere in your plugin you have added this condition, I want to know how can I remove that condition? So that without any content my custom field can be show in feed reader.
Actually I’m finding this solution for my CSS Gallery theme user:
http://www.osdesigner.net/wordpress-themes/css-gallery-theme/
Thanks for your effort 🙂
I’m trying to download this plugin, but its taking me to a 404 page. Is it no longer available?
Same like darleene.. the Download Link is Not Working!!
seems to be a promising plugin. Please correct the link asap.
For those of you still looking, I found what appears to be this plugin @
Edited
I was looking for this solution for a long time….but it seems don’t work with mine! I’m using Option template in “light”, i have all the “custom fields” in right position and check Key sensitive! What i’m doing wrong?? What should i check also?
This may be a dumb question, but does this plugin work with WordPress 2.5? I’m using Structure and trying to get this to work with it, but it doesn’t seem to have any affect on the feed.
Thanks!
I use this plug-in for one of my newest projects. And I cannot figure it out! It is easy to use and it actually works – but only for my first 6 posts. The following posts don’t show the custom field “Thumbnail” in the feed.
Also I’ve tried to change the custom field to one of the other keys like “Image”. But the same problem occurs.
It’s strange when a plug-in works 50 percent.
Any explanation? Anyone?
Thanks…
Hey Justin,
First, love your Options theme. I’m using it on my blog.
Second, just wanted to give you a heads up that your “add images to posts” link is broken.
With that broken, I was curious what the difference between Image, Featured Image and Thumbnail is when using those Key values.
Thanks!
Thank you for this! It’s exactly what I need!
Hi justin, thanks for the work, this is the 2nd or 3rd peice from you I have tried to intergrate, but im having problems with this one!
I already have custom fields set up and running, so from reading it seemed to be a simple drag and drop from me, but alas no good.
I considered that the field names might be conficting, as I have Thumnail Alt set up to display smaller versions of the same thumbnail on my home page, as the articles scroll from top down.
Could this be the problem?
This process is the start of me trying to get thumbails on to another site im using to display the feed, I will (hopefully) grab the images through magpie once this stage is complete, thats another set of problems right there…hey ho.. anyway hope you can help…
If you need more info, specifics let me know, ill be keeping a close eye on this thread.
Thanks for your time…
This plugin seems to be what I need.
I’m using the Infinity theme, and on the main page there, you can see thumbnails, put there by a custom field [key: thumbnail, value: image address]. I’d liketo show just these thumbnails on another site of mine. So all I want on this other site is those thumbnails.
I added
add_filter('the_meta','custom_fields_for_feeds');
to your plugin, but it’s not doing anything.Any ideas on how to get the feed to only show the custom field item [in my case.. a 235×150 thumbnail]?
Thanks.
edit:
So all I want on this other site is those thumbnails. [no subject/title, just the thumbnail.
Thanks for this plugin, I’m really happy I found it, but I’m having some problems:
When I check my feed the same images sometimes show up and sometimes they don’t, then being replaced by this message: this image has no alt text.
Do you know what the problem might be?
Thanks
Yamile
Great job 🙂
Sounds like a great plugin. Unfortunately, the download link isn’t working for me. Maybe a result of design changes? (I saw the design change between visiting this page and getting the 404 page from the download link.)
Great plugin!
I have already installed it and it’s running perfectly on my blog.
Thanks a lot,
Peter
Jason – I am puzzled why you would filter the_content rather than the_content_rss
i.e.
add_filter('the_content_rss', 'custom_fields_for_feeds');
Erin — I’m assuming you’re asking me, but you directly pointed out some Jason guy.
You could filter either one. So far as I know, filtering
the_content_rss
would only change things for your RSS feeds, which doesn’t represent all of your feeds. I could be wrong though. It might filter your atom feeds as well, but you’ll have to look that up.This is how Matt done it in his plugin, which this is based on, so I figured I can’t go wrong with doing things the way the head honcho of WordPress does things.
Yes, I see. Also, according to this post, sometimes the_content_rss does not always filter properly. http://www.webinventif.fr/wordpress-ajouter-du-contenu-dans-son-flux/
(Now I know I have WordPress on the brain. My boyfriend’s name is Jason. So sorry, Justin.)
@Justin
When I click on my RSS Feed, Feedburner shows the thumbnail at the top of my content. However, when viewing the XML of the feed it does not show the thumbnail. Is there a way to fix this?
Justin,
Great plugin! One question: How can I add Post Tags to a feed? It seems that they get combined with Categories.
Any help you can provide would be appreciated.
Steve
Justin,
Great reading about custom tags.
I am trying to split long posts in my wordpress database into smaller posts possibly by paragraphs and unique titles for each paragraph, now becoming a post.
I am looking for an easy way to do this through my Edit Post Dashboard Screen. I need to work on a large number of posts and I wish to manually compose Titles for each smaller posts.
Is this possible? Any guidance will be most wellcome.
Justin:
I’m using this plugin to add a teaser and thumbnail image for the “main story” on our homepage. I upgraded last week from WP 2.5 to 2.7.1 with no issues. However, today when I tried to change to a new theme that was written to take advantage of new features in 2.7.1, the teaser/image went away, assumably due to changes in the order of the schema. However, all WP documentation I can find says that theme changes have no effect on RSS feeds. I’m stumped – what could be causing this issue?
Thanks,
Alan
Is there anyway to amend this plugin to allow customisation of the feed-rss2-comments.php file?
I think this will help me a lot! Let’s try!!!
Thanks 🙂
Hi, I’ve been looking for a way to do this and this plugin is just right, but unfornantly nothing is showing up.. dose this work with feedburner?
I got this to work but it seems like only when it i have my wordpress set to full, in summery it won’t display any ideas?
Justin, how would I convert this to edit the URL of the RSS element utilizing the Custom Field options? Example: I have a custom field for AlternateURL and want the RSS item to utilize that link instead of the post link.
Thanks a bunch for the help.
Justin & All, sorry for that I got if figured out. Let me know if anyone wants this plugin feature… since it is based on Justin’s work I’ll go ahead and release it to all that want it.
Great little plugin…
How do I modify to display the excerpt instead of the content in the RSS mail?
Thanks for posting a great plugin. Recently I’ve been getting to grips with custom fields in wordpress and it looks like this plugin will be a welcome addition to my site.
Hey Justin,
I’m proud to say that I’ve taken your work here and extended it to a new level.
My blog, ShortFormBlog is a news site that focuses on visual storytelling using simple, easy-to-read styles – which vary between numbers, quotes, fact boxes, photos, “grab bags,” embedded objects and even Twitter searches. The site uses a giant loop of custom fields to do its magic.
In the seven months I’ve had the blog running, I’ve had a lot of problems problems with my RSS feed – custom fields would show up out of order without notice, annoying my readers and taking away from a pretty cool WordPress experience. I hadn’t found anything which replicated the experience of the blog itself with consistency.
But thanks to your plugin, which I modified pretty heavily to loop through a bunch of if-then-else statements, my feed is looking spectacular. And I have you to credit. Thank you sir.
Oh, and great site, by the way.
Hey,
seems like this plugin is what I need – currently have only the excerpt in my feed, not the full post. What’s the order for thumbnails to be included in the feed? Are they appended to the end of the feed entry?
the_title
the_excerpt
the_thumbnail
How would I invert the order so each feed entry would be
the_thumbnail
the_title
the_excerpt
Hi,
I have successfully installed and activated your plugin. However, I cannot tell if there is something else I should do. I am using custom fields (image) in every post, but none are displaying in the feed. Is there a control panel or something I’m missing?
Please help when you can.
Thanks.
-Leshell
Justin, thanks for the plugin. Just what I needed!
My video is showing up 2 times with some html-code in between (http://drp.ly/cmncU).
I’m supposed to use the embed code in the key field, right?
I need to display some news feed. at my site where I wana to display the news I want one image also with the news title and description. how can I do that. I think the news feed doesnt give me any image.
Is there something like I can read the link and get the image and display at my site.
Hi Justin,
i installed the plugin, created a custom field “Image” and gave it the value: “http:// www. myurl. com/ myimage.jpg
Now when i want to include(read) the feed of this post on another website with, lets say, simplepie – how can i get the value of the customfield “Image”??
Thanks alot. your help is very appriciated.
Yes, also looking to achieve what nishant is hoping to achieve
images with category feeds for the wordpress RSS
Does the Value URL custom field need to have the full relevant image path within the template directory for the feed to see it? Or will just the name of the image suffice? Thanks in advance for all your help!
First, thanks for having this plugin available. I’ve been looking for something like this for a while.
Second, here’s the site I’m hoping to use it on:
http://kingpanpan.com/
Third… Just wanted to let you know that I’ve read through your other posts as well as the comments in case you’ve gone over the solution already. I’m having the problem where not having content in the post will make the RSS entry be blank.
I even tried adding that line you said was unnecessary. I then tried it with text in the content box (no luck), then with (works with text). I even tried it with just adding html code for a non-breaking space. That seems like a last resort, but I just wanted to run it by you first.
What I can’t seem to find is a way to use these fields to post images to social bookmarks. Right now I use flv embed, and the poster image for the video does not read to any social bookmark plugin I have tried. Is there a way to use custom fields like these to be read by bookmarks like facebook etc?
Hi, nice plugin! is there any way of adding the custom fields as separate nodes in the xml feed? rather than appending it to the description.
any help is much appreciated.
thanks
Jon
Hi Justin/All,
thanks for this plugin first of all. If the plugin isn’t working for you, maybe some of you can try: http://webprocafe.com/forums-blogs-and-content-management-systems/1734-wordpress-add-custom-field-images-to.html
Thanks Justin!
Justin, I just started using taxonomies and am working with a partner that needs to have the names of the taxonomies that are associated with each post appear in the RSS. So I might have a field in the RSS like:
nfl, jets, giants, raiders
Is there a way to do this using your plugin?
Thanks in advance!
– Scot
Hi! This is just what I need 🙂 There is only one thing I wonder, I want to use an other name then “Image” on the “Key”. Is there a way I can change that in the code?
Thank you!
/ Amanda
I tried to install this on Wordpress 3.3.1 and my feed goes blank after install. Does this plugin work on Wordpress 3.3.1 or am I doing something wrong?
Okay, the blank page issue was resolved and not this plugin. Although I still cannot get images to appear in my feed I have not given up!
I’m not sure this plugin is compatible with 3.1+. Still trying to find a solution. Any one have any idea if it’s compatible?
Hey Justin, This page is a bit broken!