I am trying to change the href of the logo to a specific custom URL other than the homepage for checkout page.
I have tried few methods including the one shown below but did not work :
add_filter( 'generate_logo_href','generate_add_custom_logo_href' );
function generate_add_custom_logo_href()
{
if ( is_checkout()) {
return '';
}
else {
return '/';
}
}
This is the block of the logo. I am trying to change the href associated with the anchor tag :
<div id="logo" class="flex-col logo"> <!-- Header logo -->
<a href="" title="Title" rel="home">
<img width="213" height="89" src="https://custom/wp-content/uploads/2019/09/Logo1.svg" class="header_logo header-logo" alt="text">
<img width="213" height="89" src="https://custom/wp-content/uploads/2019/09/Logo2.svg" class="header-logo-dark" alt="text">
</a>
</div>
Is there any other hooks specifically for this purpose? I am using flatsome theme.