Custom logo in child theme

This topic contains 19 replies, has 6 voices, and was last updated by  Axle Support 1 week, 3 days ago.

Viewing 10 posts - 11 through 20 (of 20 total)
  • Author
    Posts
  • #584

    DirkS
    Participant

    Hi, i got it now with modifing the functions.php

    		// Enable support for custom logo.
    		add_theme_support( 'custom-logo', array(
    			  'height' => 150,
     		          'width' => 450,
      			  'flex-height' => true,
      			  'flex‚Äźwidth' => true,

    Hope that will not break with a update. Or can i use this with custom css, too?

    • This reply was modified 2 years, 1 month ago by  DirkS.
    #586

    Axle Support
    Moderator

    Hello,
    If you have added the changes on the child theme, your changes will not be erased on theme update.

    Regards.

    #590

    DirkS
    Participant

    OK thank you

    regards
    Dirk

    #598

    Axle Support
    Moderator

    Hello,

    If you like our theme and the support provided, can you please rate your theme on https://wordpress.org/support/theme/corporate-key/reviews/#new-post

    Thank you.

    #930

    Marjoinoz
    Participant

    Hi,

    i tried to put this code in the CSS but when I go to import my logo into site identity, it still crops my logo into a 95x95px square. Should I import my logo somewhere else?

    Thanks in advance for your help

    #931

    Axle Support
    Moderator

    Hello,
    Please add the below given CSS to Dashboard -> Appearance -> Customize -> Additional CSS

    .custom-logo-link {
        max-width: 100%;
    }

    Also try and regenerate your images with thumbnail regenerate plugin https://wordpress.org/plugins/regenerate-thumbnails/

    Regards.

    #1203

    stiv
    Participant

    Hi,

    I tried to put code in the CSS but when I go to import my logo into site identity, it still crops my logo into a 95x95px square. I tried to put this code in the functions.php in my child theme -it doesn’t work.

    
    		// Enable support for custom logo.
    		add_theme_support( 'custom-logo', array(
    			'width'  => 500,
    			'height' => 95,
    		) );

    If i change functions.php in main theme to

    // Enable support for custom logo.
    		add_theme_support( 'custom-logo', array(
    			'width'  => 500,
    			'height' => 95,
    		) );

    and my image size is 217×37 I can’t crope it in my size. What I made wrong?

    #1204

    Axle Support
    Moderator

    When you put following PHP code in child theme functions.php, logo dimension could be customized.

    
    add_action( 'after_setup_theme', 'child_theme_logo_customize', 99 );
    function child_theme_logo_customize() {
    	add_theme_support( 'custom-logo', array(
    		'width'  => 125,
    		'height' => 125,
    	) );
    }

    You may need to add some CSS for changed logo size.

    #11853

    cindygamiel
    Participant

    Berbicara mengenai daftar situs poker online resmi terpercaya 2019 maka website pilihan yang sangat tepat untuk kalian semua yakni begabung di situspoker.online.

    #11871

    Axle Support
    Moderator

    Hi @dirks,

    You can skip the logo crop and use any size you want.

Viewing 10 posts - 11 through 20 (of 20 total)

You must be logged in to reply to this topic.