Posted By

PM-Webdesign on 10/08/10


Tagged

rss post wordpress thumbnails


Versions (?)

Post Thumbnails im RSS Feed aktivieren


 / Published in: PHP
 

URL: http://www.wpbeginner.com/wp-tutorials/25-extremely-useful-tricks-for-the-wordpress-functions-file/

Code in functions.php einf├╝gen

  1. function rss_post_thumbnail($content) {
  2. global $post;
  3. if(has_post_thumbnail($post->ID)) {
  4. $content = '<p>' . get_the_post_thumbnail($post->ID) .
  5. '</p>' . get_the_content();
  6. }
  7. return $content;
  8. }
  9. add_filter('the_excerpt_rss', 'rss_post_thumbnail');
  10. add_filter('the_content_feed', 'rss_post_thumbnail');

Report this snippet  

You need to login to post a comment.