solidhex
Member
Posted 2 years ago #
Hi All
I am trying to ad a custom field to my RSS feed. The custom field is a featured image that sits above the post title.
I've modified my feed-rss2.php as follows:
<?php // added to show custom image ?>
<?php $image = get_post_meta($post->ID, 'feature_image', 1) ?>
<?php if ($image != ''): ?>
<img src="<?php echo $image; ?>" />
<?php endif ?>
And when I view the source of the feed, the image is there, HOWEVER it doesn't show up in the reader. Did I miss something?
tjmapes
Member
Posted 2 years ago #
I'd love to know this as well... I have actually gotten this to work on my site CssScoop.com .. but I had to do some major trickery. I used this:http://justintadlock.com/archives/2008/01/27/custom-fields-for-feeds-wordpress-plugin
I also just found this yet haven't tried it yet: http://dodesign.us/blog/custom-field-images-in-wordpress-feeds/
If you find a nice solution, PLEASE by all means, let me know!
puffinpunk
Member
Posted 2 years ago #
I inserted the PHP into the RSS2 file and it works perfectly. Just make sure that your custom field is calling a full url (http://www.yousite.com/image.jpg) as the RSS feeds won't recognize the directory structures.
It's pretty simple, hope you guys can get it working.