The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Display featured image in RSS Feed (1 post)

  1. kallekillen
    Posted 3 years ago #


    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!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.