Feature Image Resize for Home Page Widget

Support Area Forums Epic Feature Image Resize for Home Page Widget

Viewing 2 posts - 1 through 2 (of 2 total)
URL to the page in question: http://www.harbourfellowship.com
  • Author
    Posts
  • #22198
    Samuel
    Participant

    You can see on our website home page

    that the widget at the bottom for Featured Posts is not re-sizing the feature image

    The feature image is all not being re-sized on the blog archive page

    http://www.harbourfellowship.com/?p=*

    Any suggestions on some code to make this happen.

    Thanks much

    #22199
    Bill Robbins
    Moderator

    Hello Samuel,

    You’re welcome to change the image sizes if you’d like to. Here’s how:

    1. Go to the Appearance section in your WordPress dashboard and choose Edit.
    2. From the list of files on your right, choose images.php
    3. Add this at the bottom of the file:
      
      add_image_size('home-thumbnail', 600, 400, true);
      

      (Be sure to copy that code directly from the support site and not the notification email.)

    4. That will set the image size in the feature post widget. The 600 is the maximum width and the 400 is the maximum height. Change those values to fit the size you’d like to have there and save your changes.
    5. Next edit the post-formats.php file and change this line:
      
      <?php the_post_thumbnail('single'); ?>
      

      to be like this:

      
      <?php the_post_thumbnail( array(600, 400) ); ?>
      

      where again 600 is the maximum width and 400 is the maximum height you’d like to have there. Then save your changes.

    6. Lastly you’ll need to install and run the Regenerate Thumbnails plugin to change the images that you’ve already uploaded to be the size you’re looking for.

    That should let you change the image sizes. If you have any questions, just let me know.

    Have a great weekend,
    Bill

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Feature Image Resize for Home Page Widget’ is closed to new replies.