WordPress.org

Ready to get started?Download WordPress

Forums

Resizing post thumbnails ("Featured Image") (5 posts)

  1. monnibo
    Member
    Posted 3 years ago #

    Please excuse if this is in the wrong area. It's sort of a plugin theme crossover question.

    I recently started using a new plugin called Related Posts Thumbnails. It's working great (see bottom of this post).

    However, I was trying to resize the thumbnail images that show in each blog. The information on the plugin's page says to specify things like that in the code in the Theme Functions document.

    I was able to insert the code into function.php as follows:

    if ( function_exists( 'add_theme_support' ) )
    	add_theme_support( 'post-thumbnails', array( 'post' ) );
    
    if ( function_exists( 'add_image_size' ) ) {
    	add_image_size( 'category-thumb', 50, 50 );
    	add_image_size( 'homepage-thumb', 50, 50, true );
    
    	}

    However, the post thumbnails displayed in the plugin aren't turning up as 50x50 like I've specified. They still look to be at least 125x125.

  2. Digital Raindrops
    Member
    Posted 3 years ago #

    Not sure if this is the correct plugin?

    If it is Related Post Thumbnails then in the plugin settings you need to add 'category-thumb' or 'homepage-thumb'.

    If you have done this there is another thing to consider, adding the 'image size' code to functions.php will not retrospectivly update the existing post images.

    There is a Generate Post Thumbnails plugin for this as well!

    Footnote:
    As you are only using one size then you do not need the 'image size' code, you only need that for different sizes, like if you wanted different sized images for the archive, search and index pages.

    if ( function_exists( 'add_theme_support' ) ) {
    	/* Start WordPress Thumbnail Support Code */
    	add_theme_support( 'post-thumbnails', array( 'post' ) ); // Add it for posts
    	set_post_thumbnail_size( 50, 50, false); // Normal post thumbnails
    	add_image_size( 'single-post-thumbnail', 400, 9999 ); // Permalink thumbnail size
    	/* End WordPress Thumbnail Support Code */
    }

    HTH

    David

  3. monnibo
    Member
    Posted 3 years ago #

    Hi David,

    Yes that's the plugin. And I did generate the thumbnails with that 2nd plugin.

    Do you (or anyone else) know how to change the plugin settings to add 'category-thumb' or 'homepage-thumb'? I guess that is the part I don't understand.

    Thanks!

  4. Digital Raindrops
    Member
    Posted 3 years ago #

    Looking at the plugin screenshots there is a settings page and there is a thumbnail source, have a look at this.

    Likely find it in Admin > Settings, or linked from the Plugin install.

    Edit:
    3.Customize plugin settings under Settings -> Related Posts Thumbs

    HTH

    david

  5. monnibo
    Member
    Posted 3 years ago #

    Hi David,

    Thank you, that did resize the boxes, but the thumbnails aren't showing up using both "category-thumb" or "homepage-thumb".

    Any suggestions?

Topic Closed

This topic has been closed to new replies.

About this Topic