Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Featured image #113

Open
tomuve opened this issue Aug 8, 2016 · 1 comment
Open

Display Featured image #113

tomuve opened this issue Aug 8, 2016 · 1 comment

Comments

@tomuve
Copy link

tomuve commented Aug 8, 2016

Hi, is there any way to display the featured image of a wordpress post?. Right now the plugin works great but it shows me the image that is in the body of the post. Here is the rss url: http://blog.capitalizarme.com/chile/actualidad/feed/


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@geniustep
Copy link

add this code in the “functions.php” of your WordPress theme:

Navigate to your theme editor (Appearance > Editor).
Select and open the “functions.php” of your WordPress theme you have activated.(Remember to make edits only to your child theme).
Add the following line of codes to the file.

<?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; } ?>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants