show custom logo in wordpress code example

Example 1: adding logo support to wordpress site

add_theme_support( 'custom-logo' );

Example 2: adding logo support to wordpress site

if ( function_exists( 'the_custom_logo' ) ) {
 the_custom_logo();
}

Example 3: how to add site logo in wordpress

function themename_custom_logo_setup() {
 $defaults = array(
 'height'      => 100,
 'width'       => 400,
 'flex-height' => true,
 'flex-width'  => true,
 'header-text' => array( 'site-title', 'site-description' ),
 );
 add_theme_support( 'custom-logo', $defaults );
}
add_action( 'after_setup_theme', 'themename_custom_logo_setup' );

Tags:

Html Example