Logo Image In RSS Feed

If you would like to spice your rss feed with a little personality, you can add an image with your logo to it. It’s very simple:

Open you theme’s function.php and add the below code @ the bottom, changing the path to your image and adding the description of your blog. Check mine here
<?php
function add_my_rss_image()
{
echo '<image><title>', bloginfo_rss('name'), '</title>';
echo '<url>', bloginfo_rss('stylesheet_directory'), 'images/nameoflogo.png</url>';
echo '<link>', bloginfo_rss('url'), '</link>';
echo '<width>200</width><height>75</height>';
echo '<description>your blog description</description></image>';
}
add_action('rss2_head','add_my_rss_image');
add_action('rss_head','add_my_rss_image');
add_action('commentsrss2_head','add_my_rss_image');
?>

Thanks to Wordlog for the tut


No Comments Yet

You can be the first to comment!

Comments are closed