WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] I already have automatically created square thumbnails, how do I show them? (4 posts)

  1. jeemer
    Member
    Posted 1 year ago #

    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 "-150x150" on the end of the filename.

    For example:

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

    Is there a place in the code i can simply add in "-150x150" so that YARRP uses the thumbnails that have already been created? :)

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

  2. jeemer
    Member
    Posted 1 year ago #

    Any ideas? :/

  3. jeemer
    Member
    Posted 1 year ago #

    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.

  4. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    @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 150x150 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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.