Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #468609

    Are there any settings within the theme or in functions.php that I can use to set a specific width for the featured images that show up in my RSS feed? I would like to put them at a smaller width than how they are being displayed in my posts (e.g., I want the rss image to be 564 in width). As of now, the RSS images are huge and they mess up my RSS to email templates in MailChimp. Please advise.

    • This topic was modified 9 years, 4 months ago by ACNLatitudes.
    #469228

    Hi ACNLatitudes!

    You may need to upload them at a specific width. Send us a link and we’ll see if we can change it with CSS.

    Best regards,
    Elliott

    #471626

    OK. I included a link to the RSS feed in the private content area. Please note that I would like to keep the images on the actual Enfold WP site in large format, so I would prefer not to upload them at a smaller width. The only place where I want the smaller width images is within the RSS feed itself.

    Please advise.

    #471661

    Never mind. I was able to resolve the issue by using the following code in my functions.php file:

    /*———————————————————————————–*/
    /* Makes a Special Sized Image for MailChimp RSS Emails*/
    /*———————————————————————————–*/
    if ( function_exists( ‘add_image_size’ ) ) {
    add_image_size( ‘mailchimp_featured’, 564, 9999); //564 pixels wide and unlimited height
    }

    /*———————————————————————————–*/
    /* Puts Featured Image into RSS Feed (Enfold Theme)*/
    /*———————————————————————————–*/

    function avia_add_images_to_rss_feed($content)
    {
    global $post;
    if ( has_post_thumbnail( $post->ID ) )
    {
    $content = get_the_post_thumbnail( $post->ID, ‘mailchimp_featured’, array( ‘style’ => ‘display: block;’ ) ) . ‘<br/>’ . $content;
    }
    return $content;
    }

    add_filter(‘the_excerpt_rss’, ‘avia_add_images_to_rss_feed’);
    add_filter(‘the_content_feed’, ‘avia_add_images_to_rss_feed’);

    #472263

    Hi!

    Glad you figured it out and thank you for sharing your solution! :)

    Best regards,
    Yigit

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Problem with Width of RSS Images’ is closed to new replies.