Skip to content

Instantly share code, notes, and snippets.

/bilder-feeds.php
Created Jan 20, 2016

Embed
What would you like to do?
<?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
You can’t perform that action at this time.