View Single Post
Old 07-13-2011, 02:47 PM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,235
Quote:
Originally Posted by IllTestYourGirls View Post
Anyone know how I can add pictures to my wordpress rss feeds? Like the feed grabs one of the pictures in the post.

And any recommendations for good rss feed widgets so I can place the rss feed on other sites? I see a few nice ones when I google for them, just want some feed back and suggestions.

if you have featured image try adding this to your functions.php of your theme

Code:
function thumb_feed($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '' . get_the_post_thumbnail( $post->ID, 'thumbnail', array( 'alt' => get_the_title(), 'title' => get_the_title(), 'style' => 'float:right;' ) ) . '' . $content;
}
return $content;
}

add_filter('the_excerpt_rss', 'thumb_feed');
add_filter('the_content_feed', 'thumb_feed');
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote