WordPress.org

Ready to get started?Download WordPress

Forums

Feature A Page Widget
[resolved] Thumbnails chopped (4 posts)

  1. gordo019
    Member
    Posted 1 year ago #

    I am using wrapped image layout in the widget config. But my thumbnails are using a 200 by 200 version that is chopping the top and bottom portions of my image. I have regenerated all thumbnails with regenerate thumbnails plugin. Media settings is set to: Crop thumbnail to exact dimensions (normally thumbnails are proportional) UNCHECKED. What do I need to do see my entire image within the thumbnail image?

    http://wordpress.org/extend/plugins/feature-a-page-widget/

  2. mrwweb
    Member
    Plugin Author

    Posted 1 year ago #

    Hi @gordo019.

    Sorry to hear about your troubles.

    What you're seeing is the expected behavior of the plugin. Because people rely on their thumbnail setting for other places in the theme, I can't assume that it will always be appropriate for use in any of the layouts.

    However, there is a filter that lets you modify the widget output. You can see that other people are using it to solve image size issues.

    Because you want to use an existing image size, your code snippet would be a little easier than the linked example:

    // override the featured image with the thumbnail size image
    function fpw_custom_featured_image( $featured_image, $featured_page_id ) {
        return get_the_post_thumbnail( $featured_page_id, 'thumbnail' );
    }
    add_filter( 'fpw_featured_image', 'fpw_custom_featured_image', 10, 2 );

    That should do it and you shouldn't need to run regenerate thumbnails. Let me know if this works and I can mark this thread as resolved.

  3. gordo019
    Member
    Posted 1 year ago #

    That did the trick. If the plugin had admin settings that would be a nice thumbnail option. A checkbox in the widget might be an alternative too. Though, might clutter the widget. What do you recommend for a Feature a Post Widget?

  4. mrwweb
    Member
    Plugin Author

    Posted 1 year ago #

    Glad I could help.

    I'm thinking hard about options to add in future versions, so I'll try to think about adding image size options down the road, probably in the widget itself.

    If you have a moment, you can vote on future options you'd like to see. Those results will largely drive my decision-making. Based on your request, I added a "custom image sizing" option to the poll.

    Regarding featured posts, I'm thinking about adding that to a future version (within the next month?). In the mean time, take a look at the second-to-last paragraph in the FAQ for suggestions. I'm not really thrilled with any of them, but Simple Featured Posts Widget is probably the closest.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic