• Resolved Janell2

    (@janell2)


    First, I apologize if this is not the place to ask this question …for help!

    I have a theme that has a way for Client logos to display by category on a PAGE. You fill in a “Client” post for each logo you want to add (by making the featured image the logo), and then on the Page, you select the Shortcode for “Client” and then on that shortcode form you select what category you want the logo to display under. GREAT!

    However, the logos are set in the theme-functions.php as 75px square. Much too tiny to be able to read. I wish they had let us set the size. I was able to, by great convoluted coding in the CSS, get it to display to the size I want, but it STILL creates the image to 75 pixels, so actually I am blowing up the logo and it looks terrible.

    I of course bought support for the theme, but they tell me this would be a modification to theme files & therefore can’t help (I understand) but he did tell me that the size call out was in theme-name>functions>theme-function.php. I know I found the correct code as the support person did say that the clients-slider worked for the slider as well as the non-slider:

    /* ---------------------------------------------------------------------------
     * Add Image Size
     *
     * TIP: add_image_size ( string $name, int $width, int $height, bool|array $crop = false )
     * --------------------------------------------------------------------------- */
    if( ! function_exists( 'mfn_add_image_size' ) )
    {
    	function mfn_add_image_size() {
    
    		// Backend --------------------------------------------
    
    			// Featured Image
    			set_post_thumbnail_size( 			260,  146,  false );
    
    			// Custom Post Format - List Thumbnails
    			add_image_size( '50x50', 			50,   50,   false );
    
    		// Builder Items --------------------------------------
    
    			// Clients - do NOT crop logos
    			add_image_size( 'clients-slider', 	150, 75,   false );

    I changed it to: add_image_size( 'clients-slider', 150, 110, false );
    BUT it did not work.

    Anyone know what I am doing wrong? Your help would be very much appreciated! I would love to post the URL of the site, but HOSTGATOR just stopped allowing temporary URLs (YIKES!)
    Thanks so much,
    Janell

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What do you mean “didn’t work”? If you mean it did not change the size of existing thumbnails and only affects newly uploaded ones, that’s the way things work. Use a plugin that rebuilds thumbnails to re-create the existing thumbnails for the new size.

    Thread Starter Janell2

    (@janell2)

    Steve,
    Ah, I see, I will try that. Thanks so much for taking the time & answering so quickly.
    Janell

    Thread Starter Janell2

    (@janell2)

    Steve,
    Absolutely perfect. I cannot thank you enough as I NEVER would have figured that out.

    For others the plug-in that worked for me was: “Simple Image Sizes”. It puts a “Regenerate Image Sizes” right below the Featured Image. Just click that (not sure if you need to Update the page but I did for all 77 logos!) and it was fixed. Just a little adjustments on the CSS and I’m back in business.

    Thanks again Steve, you are wonderful!
    Cheers,
    Janell

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Change to theme-functions.php – add_image_size’ is closed to new replies.