I’m trying to style the RSS feed that the user would see. So all all they would see is the image from the post, the text from the WYSIWYG editor and a button that’s part of the theme.
Here is the button from the single.php template file:
<div class="bottomgift clearfix">
<a target="_blank" rel="nofollow" href="<?php getCustomField('Affiliate Link'); ?>" class="go-button">Go</a>
</div>
How do I add all this to style the RSS feed?
In Functions.php
function modRSS($content) {
global $post;
if ( has_post_thumbnail( $post->ID ) ){
$content = '<div>' . get_the_post_thumbnail( $post->ID, 'full', array( 'style' => 'margin-bottom: 15px;' ) ) . '</div>' . $content;
}
$content = $content . '<a href="' . getCustomField('Affiliate Link') . '">Go</a>';
return $content;
}
add_filter('the_excerpt_rss', 'modRSS');
add_filter('the_content_feed', 'modRSS');
You can prepend or amend any syntax to WordPress RSS feeds quite easily.
Here is some code to do that take from here… http://webdesignzo.com/show-featured-images-in-rss-feed-feedburner/ modified a little for your purposes.
My code is untested but something like this should be what you are looking for.
P.S. This isn’t styling per say as your question title suggests, but more adding markup to it.