Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter( 'the_content', 'featured_image_in_feed' );
- function featured_image_in_feed( $content ) {
- global $post;
- if( is_feed() ) {
- if ( has_post_thumbnail( $post->ID ) ){
- $output = get_the_post_thumbnail( $post->ID, 'medium', array( 'style' => 'float:right; margin:0 0 10px 10px;' ) );
- $content = $output . $content;
- }
- }
- return $content;
- }
- ?>
- credit to: https://wpism.com/image-wordpress-rss-feed/
Advertisement
Add Comment
Please, Sign In to add comment