• I am trying to correct the size of the thumbnails that appear on my site. They are so zoomed in that when they appear on the main page, it is difficult to see what the picture is.

    Also, is there a way to set a default thumbnail to appear on the featured page if I don’t upload one?


    http://beefelle.com is the website if you would like to take a look at what I mean.

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • I beleive in media settings there’s an option to crop or show proportional thumbnails. So you’ll want to show them proportional.

    Not sure what you mean by “default thumbnail on featured page”

    Do you mean:

    All posts in category A have thumbnail A

    All posts in category B have thumnbail B

    ect.
    ?

    Yes, there is an option at the media settings which let you set the thumbnail size.

    And you mean to use a default thumbnail when you haven’t set a specific thumbnail? yes.

    There is a plugin for that or you can do it by code:

    <?php $thumb = get_the_post_thumbnail();
    if ( ! empty( $thumb ) ):
    echo get_the_post_thumbnail($page->ID, array(130,181));
    else : ?>
    <img src="your default thumb here">
    <?php endif;?>

    Change the 130 and 181 to the size you want

    wonder if a category filter could be applied? Perhaps something like this, but I haven’t tested, I’m not a good coder.

    <?php $thumb = get_the_post_thumbnail();
    if ( ! empty( $thumb ) ):
    echo get_the_post_thumbnail($page->ID, array(130,181));
    else : 
    
    if (is_category('category-1')) { ?>
    <img src="your default thumb here">
    <?php } ?>
    
    <?php if (is_category('category-2')) { ?>
    <img src="your default thumb here">
    <?php } ?>
    
    <?php endif;?>

    Thread Starter naijay

    (@naijay)

    @dbalden when I set the thumbnail size, the photo still appears as one big blurr on the main page. As if it was zoomed in too far. I’m not sure what’s happening with that… the dimensions are currently set to 150×150.
    I’m wondering if the code for my featured posts on the main page is teh reason why this is happening?

    Once I get this issue resolved, I’ll take a look at the code you provided to set the default thumbnail.

    Thanks so much!

    @deepbevel thanks for your input. The settings option didn’t seem to help to change the issues i was having!

    I see the thumbnails are still cropped. If you set them to be proportional under settings, it may be the case that the images need to be re-uploaded for the change to take. You might try it with one to test.

    coinicidently, I’m having a similar issue, one of my thumbs is proportional but the others are cropped, the images are the same size and have the same media library settings. I’ve tried re uploading the image and turning off the plugins but the issue persists. I’ll try another theme next.

    Thread Starter naijay

    (@naijay)

    @deepbevel ok, well I hope we can both get our issue sorted! It just looks really weird! Not a very pleasant look to have! lol

    where the code says

    get_the_post_thumbnail();

    try using one of these

    get_the_post_thumbnail($id, 'thumbnail');     // Thumbnail
    get_the_post_thumbnail($id, 'medium');        // Medium resolution
    get_the_post_thumbnail($id, 'large');         // Large resolution
    
    get_the_post_thumbnail($id, array(100,100) ); // Other resolutions

    It solved my issue, now all thumbnails use the same defaults

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Featured Posts Thumbnails’ is closed to new replies.