WordPress.org

Forums

Fix Facebook Like
Thumbnail image size problem (1 post)

  1. martinezrw
    Member
    Posted 10 months ago #

    My pages where always failing the facebook object debugger test because this plugin was taking the 150x150 image. I made a simple change to the plugin and now it pulls the 300x200 image and facebook is happy.

    I simply added the , 'medium' argument to the get_post_thumbnail_id method.

    if ( has_post_thumbnail( $posts[0]->ID ) ) {
    				$thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $posts[0]->ID), 'medium'); //Change made here!!!
    				$thumb = $thumb[0]; // take the URL from the array
    				$thumb_set = true;
    			}

    https://wordpress.org/plugins/fix-facebook-like/

Reply

You must log in to post.

About this Plugin

  • Fix Facebook Like
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic