WordPress.org

Ready to get started?Download WordPress

Forums

Pinterest in Jetpack - which post image does it use (7 posts)

  1. roraz
    Member
    Posted 1 year ago #

    I have started using the Pinterest button in the sharing section of Jetpack, however when I try it out it seems to 'grab' the post thumbnail, which I have set for quite small, and I have other sizes set which I would like it to use - is there a way to do this, by stating which post thumbnail size it should go for ie medium, large, original, one I have created etc??

  2. roraz
    Member
    Posted 1 year ago #

    Does anybody have an answer for this, as I have been searching this forum and Google for one to no avail??! :(

  3. silverandrew
    Member
    Posted 1 year ago #

    Same! Except I would just like it to pull the 'featured image' of the post without using the thumbnail size, or cropping it! All the images that get pinned using this plugin get cropped and look bad once pinned!

  4. silverandrew
    Member
    Posted 1 year ago #

    I decided to mess with it a bit. I got it to change the image size and it will still pull the post attachment image, but it's no longer cropped! :)
    In /wp-content/plugins/jetpack/modules/sharedaddy/sharing-sources.php edit line 1119 from $thumb = wp_get_attachment_image_src( $thumb_id );
    to $thumb = wp_get_attachment_image_src( $thumb_id , 'large' );

    Hope this helps some people! :)

  5. roraz
    Member
    Posted 1 year ago #

    Thanks, Ill give that a shot!

  6. Niels Christian
    Member
    Posted 1 year ago #

    This might help

    http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src

    Havent tried it out yet though.

    also found it on line 1156:

    if ( function_exists('has_post_thumbnail') && has_post_thumbnail() ) {
    			$thumb_id = get_post_thumbnail_id();
    			$thumb = wp_get_attachment_image_src( $thumb_id, 'full' );
  7. Niels Christian
    Member
    Posted 1 year ago #

    Just to note that using

    $attachment_id

    instead of

    $thumb_id

    , did not work for me. But using

    $thumb = wp_get_attachment_image_src( $thumb_id, 'large' );

    as silverandrew was suggesting did work on line 1158.

Topic Closed

This topic has been closed to new replies.

About this Topic