• Resolved mspr1nt

    (@mspr1nt)


    Hello. Is there a php snippet available for adding featured images to standard WP RSS feed when using AMP in Standard mode? Specifically to ensure that it grabs the large preview and not the thumbnail/ensure compatibility with Google Discover?

    I’ve been using the GN Publisher Plugin by Chris Andrews, which has served me well, but gradually looking to trim down as many Plugins as I can.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    This doesn’t appear to be related to a template mode in the AMP plugin, but rather to a general integration issue for Google Search.

    I believe what you’re looking for has been written up in a Make/Core post: Enhancing image preview: core proposal.

    If I understand correctly, all you need to do is add the following plugin code:

    add_action( 'wp_head', function() {
        echo '<meta name="robots" content="max-image-preview:large">';
    } );

    Since you’re using the Standard template mode, this can go into your theme’s functions.php.

    If you were using the AMP Legacy Reader mode, then you’d have to make use of the amp_post_template_head action instead. And if you were using a Reader theme, then the wp_head code should be put into a separate plugin. In any case, it’s better to put such code in a custom plugin rather than your theme.

    Thread Starter mspr1nt

    (@mspr1nt)

    Heya. Thanks for the response. It’s more to do with the standard RSS WP Feed not picking up images in the feed. Max:preview is added through my theme/SEOPlugin so that works…. work but in the RSS feed itself as in /feed – the images aren’t being pulled through to render in places like Publisher Center.

    Plugin Author Weston Ruter

    (@westonruter)

    I think it’s better to inquire elsewhere about this, as extending the RSS feed is not related to the AMP plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding featured images to RSS feed’ is closed to new replies.