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');