Created
January 20, 2016 19:25
-
-
Save anonymous/61b95f0a7999cb54f167 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Beitragsbilder zu den RSS-Feeds hinzufügen | |
function ah_rss_post_thumbnail($content) { | |
global $post; | |
if(has_post_thumbnail($post->ID)) { | |
$content = '<p>' . get_the_post_thumbnail($post->ID) . | |
'</p>' . get_the_content(); | |
} | |
return $content; | |
} | |
add_filter('the_excerpt_rss', 'ah_rss_post_thumbnail'); | |
add_filter('the_content_feed', 'ah_rss_post_thumbnail'); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment