-
AuthorPosts
-
July 21, 2016 at 3:00 pm #663416
Hello,
Is it possible to change te url only on the homepage on the logo element?
I’ve seen this post:
https://kriesi.at/support/topic/changing-the-header-logo-link/#post-661402But that’s for all the pages. Maybe put the functions in a code block on the homepage?
The reason I’m asking is because I want to but a button on the same place as the logo in stead of the logo.
Maybe there is an other possibility, for example placing a custom block on the same place as the logo?Greets Jeen
July 21, 2016 at 7:31 pm #663556Hey Jeen,
Thanks for getting in touch with us!
Please try adding the following code to you functions.php file:
add_filter('avf_logo_link','av_change_logo_link'); function av_change_logo_link($link) { if(is_page(59)){ $link = "http://kriesi.at"; } return $link; }Note that you need to change the ’59’ to the page id of your homepage.
Best regards,
JordanJuly 29, 2016 at 5:17 pm #666652Hello Jordan,
Thanks for the quick response. I’ve missed your email so that’s why I haven’t reached back to you.
Code works perfect. Thank you! Is it also possible to add a target=”_blank” to the URL?Greets Jeen
July 29, 2016 at 5:22 pm #666654Hey!
Please add following code to Functions.php file as well
function logo_attr(){ ?> <script> jQuery(window).load(function(){ jQuery('.logo a').attr('target','_blank'); }); </script> <?php } add_action('wp_footer', 'logo_attr');Cheers!
YigitJuly 29, 2016 at 5:42 pm #666664Hello Yigit.
Is it also possible to do this on a page? So only homepage target=”_blank”?
Gr. Jeen
July 29, 2016 at 7:40 pm #666682Hey!
Yes, please change the code to following one
function logo_attr(){ ?> <script> jQuery(window).load(function(){ jQuery('.home .logo a').attr('target','_blank'); }); </script> <?php } add_action('wp_footer', 'logo_attr');Best regards,
YigitJuly 30, 2016 at 11:49 am #666808Yigit! You’re a boss! Thanks. Everything works perfect!
Gr. Jeen
August 1, 2016 at 8:07 am #667142Hi,
Glad we could help! We really appreciate it if you rate our theme on themeforest .
To know more about enfold features please check – http://kriesi.at/documentation/enfold/
Thank you for using Enfold :)Best regards,
Vinay -
AuthorPosts
- The topic ‘Change logo url only on homepage / or please custom block in header’ is closed to new replies.
