Support » Fixing WordPress » Display featured image in RSS Feed

  • Hi,

    I’m trying to customise my feed to display the featured image of a post, but ONLY if it’s in a specific category (let’s call it “whatever”).

    Am I right to think I would use something in the lines of this in the feed:

    <?php if (in_category( 'whatever' )) : ?>
     <media:content url="<?php echo wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?>" medium="image" />

    Or is there a way for me to just do it through functions.php/feed.php?

    Any help would pe highly appreciated!

  • The topic ‘Display featured image in RSS Feed’ is closed to new replies.