admin管理员组文章数量:1388160
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.
本文标签: hooksChanging header logo href for the checkout page
版权声明:本文标题:hooks - Changing header logo href for the checkout page 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744539337a2611513.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论