mardi 24 février 2015

RSS image size is not working

I have no clue what to do with our mailchimp rss feed that is not resizing the featured images like it used too. We have this code in the wordpress template function file that I think is where the size should be included.


Can anyone fix this for me, very desperate...please.



add_filter('the_content_rss', 'featuredtoRSS');
add_filter('the_excerpt_rss', 'featuredtoRSS');

// Include Video Thumbnail in RSS Feed
function featuredtoRSS($content) {
global $post;
if ( in_category('videos') && has_post_thumbnail( $post->ID ) ){
$content = '' . '<div style="text-align:center">' . '<br />' . '<a href="' . get_permalink($post->ID) . '">' . get_the_post_thumbnail( $post->ID, 'Featured Video', array( 'style' => 'float:none; display:block; margin-right:auto !important; margin-left:auto !important;' ) ) . '</a>' . '</div>'. '<br /><br />' ;
}

elseif ( in_category('cartoons') ){
$content = '<div style="text-align:center">' . '<a href="' . get_permalink($post->ID) . '">' . 'Cartoon:' . get_the_title($post->ID) . '</a>' . '</div>';
}

Aucun commentaire:

Enregistrer un commentaire