I am trying to change the logo link of my wordpress website. But I am unable to achieve it. I am using child theme and using the code.
function crunchify_custom_logo_url ( $crunchify_logo_html ) {
$crunchify_custom_logo_id = get_theme_mod( 'custom_logo' );
// Make sure to replace your updated site URL
$crunchify_new_url = 'https://demystifytravel.com/home/';
$crunchify_logo_html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
esc_url( $crunchify_new_url ),
wp_get_attachment_image( $crunchify_custom_logo_id, 'full', false, array(
'class' => 'custom-logo',
) )
);
return $crunchify_logo_html;
}
add_filter( 'get_custom_logo', 'crunchify_custom_logo_url' );
This code is not giving the error but its not working as it should. Any help where I am going wrong.