0

I'm currently using the following code:

function featuredtoRSS($content) {
    global $post;
    if ( has_post_thumbnail( $post->ID ) ){
        $content = '<div>' . get_the_post_thumbnail( $post->ID, 'medium', array( 'style' => 'margin-bottom: 15px;' ) ) . '</div>' . $content;
    }
    return $content;
}
add_filter('the_excerpt_rss', 'featuredtoRSS');
add_filter('the_content_feed', 'featuredtoRSS');

Which does work, but I'm running a few MailChimp RSS emails campaigns and am needing one RSS feed to show the featured image (articles feed) and one where I don't want to show the featured image.

My thought is to do this by category, possibly?

Let me know if more clarification is needed!

Thanks!

1

WPBeginner has a nice article " How to Create Custom RSS Feeds in WordPress" that addresses this from a manageable perspective.

They cover creating custom feeds, and using theme templates to customize what your feeds publish.

Take a look.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.