Custom Logo is your Brand Logo which is shown usually above or on navbar. During the development of wordpress theme, you need to setup the custom logo design. The image or log is shown in the dashboard>customize>site identity. But It is not shown unless you put these code in the function.php .
/* customize theme logo*/
function customize_logo(){
$default=array(
‘height’=>50,
‘width’=>177,
‘flex-height’=>true,
‘flex-width’=>true,
‘header-text’=>array(‘site-title’,’site-description’)
);
add_theme_support(‘custom-logo’,$default);
}
add_action(‘after_setup_theme’,’customize_logo’);
height
Expected logo height in pixels. A custom logo can also use built-in image sizes, such as thumbnail, or register a custom size using add_image_size().
width
Expected logo width in pixels. A custom logo can also use built-in image sizes, such as thumbnail, or register a custom size using add_image_size().
flex-height
Whether to allow for a flexible height.
flex-width
Whether to allow for a flexible width.
header-text
Classes(s) of elements to hide. It can pass an array of class names here for all elements constituting header text that could be replaced by a logo.
Now To call the or display logo in front page you can put the following code in header of your page.
if ( function_exists( ‘the_custom_logo’ ) ) {
the_custom_logo();
}