• Resolved tastymouse

    (@tastymouse)


    When I upload a logo it must be cropped, this can’t be skipped. I can’t find in which file the size of the logo is set. Can anyone tell me where to look please?

Viewing 6 replies - 1 through 6 (of 6 total)
  • sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    The logo size is set in functions.php. I would suggest creating a child theme so that any customizations you make will not be overwritten by a future theme update.

    Child Themes
    Child Theme creation plugins

    In the original functions.php file, this would be the section you would be interested in.

    // Enable support for custom logo.
    	add_theme_support( 'custom-logo', array(
    		'height'      => 240,
    		'width'       => 240,
    		'flex-height' => true,
    	) );
    Thread Starter tastymouse

    (@tastymouse)

    Hi, this didn’t work. I added the code to my child themes’s function.php but the customizer still want me to crop the image to the old (square) ratio.
    When I choose the image I see a message: Suggested image dimensions: 240 by 240 pixels. In the function.php I changed this to height 95 and width 290.

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Sorry about that. Let me set up my test site with Shoreditch and see if I can get this to work. Looking at the above, it looks like I may have left out some code.

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Ok, I’ve tested the following in my test site with a Shoreditch child theme and it sets the logo size to 290 x 95 pixels. Add this to your child theme functions.php file below the other stuff in that file.

    // SET NEW LOGO SIZE IN CHILD 
    if ( ! function_exists( 'shoreditch_setup' ) ) :
    	function shoreditch_setup() {
    		// Enable support for custom logo.
    	add_theme_support( 'custom-logo', array(
    		'height'      => 95,
    		'width'       => 290,
    		'flex-height' => true,
    	) );
    }
    endif;
    Thread Starter tastymouse

    (@tastymouse)

    Yes, this works :).
    Thanks, Tom

    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hooray and you are welcome!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Custom logo size’ is closed to new replies.