• Resolved ljg3

    (@ljg3)


    Here’s a quick change you can make to have WordPress use your post thumbnail image if available (and fallback to the image you specify in the plugin settings.) In WordPressConnect.php change (starting at line 171):
    <meta property="og:image" content="<?php echo get_option( WPC_OPTIONS_IMAGE_URL ); ?>" />
    to

    <?php if (!is_home() && (has_post_thumbnail()) ):
    			$fb_thumb = wp_get_attachment_image_src( get_post_thumbnail_id() );
    		?><meta property="og:image" content="<?php echo $fb_thumb[0]; ?>" />
    		<?php else: ?>
    		<meta property="og:image" content="<?php echo get_option( WPC_OPTIONS_IMAGE_URL ); ?>" />
    		<?php endif; ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WordPress Connect] Post Thumbnail Images to Facebook’ is closed to new replies.