WordPress.org

Support

Support » Plugins and Hacks » [Resolved] <image> blocks in sitemaps don't show featured image

[Resolved] <image> blocks in sitemaps don't show featured image

  • Hi Joost,

    I do understand that this is a design decision, but the problem is my theme is coded in a way that the “featured image” is the main image in a post.

    Is there a way for me to modify the plugin so that it considers all the attachments of a post instead of just the ones in post_content?

    —–

    Just so you know, I have tried using this in functions.php:

    add_filter('the_content', 'add_extra_content');
    function add_extra_content($content){
    	if(is_single()){
    		$content = '<p style="text-align: center;">' . get_the_post_thumbnail( $post->ID, 'full' ) . '</p>' . $content;
    	}
    	    return $content;
    }

    But the sitemaps still don’t show the featured image — probably because the image is NOT written to post_content in DB. 🙁

    Any help is appreciated. Thanks!

    http://wordpress.org/extend/plugins/wordpress-seo/

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] <image> blocks in sitemaps don't show featured image’ is closed to new replies.