WordPress.org

Support

Support » Plugins and Hacks » [Resolved] I already have automatically created square thumbnails, how do I show them?

[Resolved] I already have automatically created square thumbnails, how do I show them?

  • My theme automatically creates thumbnail versions of the featured image. YARRP automatically uses the full featured image, and squashes it down to fit.

    The only difference is “-150×150” on the end of the filename.

    For example:

    test.jpg is the featured image.
    test-150×150.jpg is the automatically created thumbnail.

    Is there a place in the code i can simply add in “-150×150” so that YARRP uses the thumbnails that have already been created? 🙂

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Any ideas? :/

    I couldn’t wait for a response any longer so I’ve found a fix.

    Somewhere else on the forum someone suggested the following;

    Okay I finally found a way, on line 40 in template_thumbnails.php and changed this :

    $post_thumbnail_html = get_the_post_thumbnail( null, $dimensions[‘size’] );

    to

    $post_thumbnail_html = get_the_post_thumbnail();

    their line didn’t work exactly for me, but with a bit of tinkering I found that this does work, for me anyway;

    $post_thumbnail_html = get_the_post_thumbnail($post_id, ‘thumbnail’);

    The only other suggestions I saw for people asking similar questions were talking about rebuilding thumbnails, something which is completely unnecessary for me as my thumbnails exist and are working fine, YARPP just wasn’t picking them up.

    Plugin Author mitcho (Michael Yoshitaka Erlewine)
    Member

    @mitchoyoshitaka

    @jeemer Sorry to hear this has been tricky for you. There’s info in the readme in the FAQ section for setting the yarpp-thumbnails size. You should be able to set this to 150×150 and have it use those same thumbs.

    You don’t want to modify the files in YARPP itself, as they will be overwritten when you upgrade YARPP.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] I already have automatically created square thumbnails, how do I show them?’ is closed to new replies.