Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Robin Cornett

    (@littlerchicken)

    This is actually a feature I’ve been thinking lately about adding, although it requires a bit of digging into, so that the featured image is not duplicated if your theme (or other plugin) already adds it to your feed.

    One option you could try in the meantime, if you are able to try adding some code, would be to add the featured image, properly sized, to your feed. This code should do it:

    add_filter( 'the_content_feed', 'rgc_add_featured_image_to_feed', 1000 );
    function rgc_add_featured_image_to_feed( $content ) {
    	if ( has_post_thumbnail() ) {
    		$content = get_the_post_thumbnail( get_the_ID(), 'mailchimp', array( 'style' => 'display:block;margin: 0 auto 12px;' ) ) . $content;
    	}
    	return $content;
    }

    It uses the image size created by this plugin, and adds it to the beginning of your content, the same styling as the other images would be, so it should feel fairly seamless. If I add this feature to the plugin in the future, I’d make it an optional setting, so you could update safely, and remove this code if you use the new feature.

    If you use the code, you can add it to your theme’s functions file: just please practice safe coding, make sure things are backed up, etc. etc.

    But the short answer is yes, this idea is on my mind; I just want to make sure I’d do it right. Thank you for asking!

    Thread Starter buyadrawing

    (@buyadrawing)

    Wow, thank you for the quick reply! I added the code to my functions.php file and it works perfectly! I appreciate the quick response.

    https://buyadrawing.com/feed/?post_type=portfolio-790

    Plugin Author Robin Cornett

    (@littlerchicken)

    Great, glad that got you where you want to be! I peeked at your art–really like the office gift; that’s a fun idea, and turned out great!

    Thread Starter buyadrawing

    (@buyadrawing)

    Thank you! I appreciate that!

    Hi Robin,

    Great plug-in, solves a problem I have with my MailChimp RSS campaign getting ugly when some of my writers post monster photos.

    A question, which frankly is an issue with a new theme I’m using, but which I thought you might have ideas on since you clearly know the in and outs of WP RSS, MailChimp, etc…

    In my feed I now get both the featured image and its thumbnail, which both show up in the MailChimp email. See https://millstonenews.com/feed

    Theme authors don’t know what to do. Any thoughts?

    Plugin Author Robin Cornett

    (@littlerchicken)

    Brent, can you start a new support thread on this please? It helps keep things sorted, but also helps future users find answers to their issue. In the thread, can you confirm if you added the code I provided above to your site (in the functions.php file, maybe)? Can you also verify that you are using the alternate feed setting, as it looks like you are?

    The thumbnails which are being added to your feed are not coming from this plugin, I am nearly completely certain–the markup is not what I expect. If it’s not coming from your new theme, there may be another plugin adding it, or a must-use plugin which needs to be looked at more deeply.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Featured Images in Full Text Feeds’ is closed to new replies.