how to make logo of a site navigate to home page in wordpress code example

Example 1: wordpress logout to home page

// on your theme -> functions.php -->
add_action('wp_logout','auto_redirect_after_logout');
function auto_redirect_after_logout(){
  wp_safe_redirect( home_url() );
  exit;
}

Example 2: adding logo support to wordpress site

add_theme_support( 'custom-logo' );

Example 3: adding logo support to wordpress site

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

Tags:

Go Example