This topic has 6 replies, 2 voices, and was last updated 6 months, 1 weeks ago ago by Luca Rossi
Hi there. To achieve this you gave me the code below. However, this is no longer working! Any idea why?
add_action('wp_footer', 'n2t_wp_footer', 99);
function n2t_wp_footer() {
if(is_singular('product')){
?>
<script>
!function($) {
"use strict";
$(document).ready(function(){
$(".et_b_header-logo > a").attr('href', 'https://yourcustomlink.com');
});
}(jQuery);
</script>
<?php
}
}
Hi @Roobinda,
The custom codes are working for the Product pages only.
Do you want to make it work for all the pages?
Best Regards,
8Theme’s Team
Oh I can see that now. Yes, I need it to work for every page…
Hi @Roobinda,
Please use this code instead, we’ve updated the codes to make it work for all pages:
add_action('wp_footer', 'n2t_wp_footer', 99);
function n2t_wp_footer() {
?>
<script>
!function($) {
"use strict";
$(document).ready(function(){
$(".et_b_header-logo > a").attr('href', 'https://yourcustomlink.com');
});
}(jQuery);
</script>
<?php
}
Hope it helps!
Perfect! Thank you.
Glad we’re able to help you!
Best Regards,
8Theme’s Team
You must be logged in to reply to this topic.Log in/Sign up