Adding the image tag to Wordpress's rss headers

Jul 28, 2008 21:42

The RSS specification allows you to have an element in the header of your RSS feed.  A long time ago, if you used Wordpress, you'd have to edit the wp-rss.php file and be very careful when you upgraded to new releases, or your change could be lost.

But if you use a modern version of Wordpress, you should take advantage of the do_action(' ( Read more... )

programming, code, wordpress, geek

Leave a comment

Comments 17

path of image anonymous August 10 2008, 16:11:00 UTC
Hi

bloginfo_rss('stylesheet_directory')

would probably be better than

bloginfo_rss('url')

so that you could use an images folder in the theme itself. Very helpful function, many thanks.

Reply

Re: path of image dblume August 10 2008, 17:05:06 UTC
Excellent suggestion, thanks!

Reply


well done anonymous September 23 2008, 00:04:04 UTC
Perfect news!, man

Reply


well done anonymous September 28 2008, 12:03:35 UTC
nice work, brother

Reply


festootfj February 21 2009, 18:12:36 UTC
What a good feature, many thanks. I am using Wordpress 2.6 and my rss feed have an image i specified to display.
-Cars

Reply


I must have missed a step anonymous April 16 2009, 22:15:19 UTC
I added this code to my functions.php but didn't get the desired result.

you said to:

"Take care to actually put an image file in the path specified, and adjust the width and height accordingly."

I'm not sure I know what you are saying here. There are images in every one of my articles. Am I supposed to do more than paste the code into the functions.php theme file?

I'd appreciate help for anyone.

Thank you,

Sharon

smkyle1@yahoo.com

Reply

Re: I must have missed a step dblume April 16 2009, 22:32:54 UTC
This tip doesn't have anything to do with images in your blog's articles. It only describes a WordPress-compatible way to provide an image to associate with the entire feed itself. (This is a rarely-used feature.)

Refer to the link at the top of this post, and examine only the section, " sub-element of ", to see what this is about.

If you get it, and can read XML, and understand the intent of the RSS schema, then this tip is for you. To verify you've done it correctly, you may want to cURL your feed's address and visually inspect the element. Most people don't concern themselves with this sort of thing.

Reply


Leave a comment

Up