-
AuthorPosts
-
March 3, 2015 at 9:45 pm #405428
Hi thanks for an amazing theme. I am trying to add a different URL link to a different logo I have created for specific pages.
I have altered the code (private below) in the functions.php file, but I just need to know how to add a specific URL to the new images. I just wanted these logos on these pages below to be linked to a different URL within the site.
Thanks!
Josh
March 4, 2015 at 8:27 pm #406025Hey jrw023!
Please add following code to Functions.php file
add_filter('avf_logo_link','av_change_logo_link'); function av_change_logo_link($link) { if(is_page(1)) { $link = "http://kriesi.at"; } if(is_page(2)) { $link = "http://kriesi.at/themes"; } return $link; } add_filter('avf_logo','av_change_logo'); function av_change_logo($logo) { if(is_page(1) ) { $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo.png"; } if(is_page(2) ) { $logo = "http://kriesi.at/wp-content/themes/kriesi/images/logo2.png"; } return $logo; }
Best regards,
YigitMarch 25, 2015 at 2:03 pm #417731Yigit,
It worked well, (for a while).
After that, the page gone “blank”.
I removed the code and the page came back to normal.
Newton
March 25, 2015 at 3:03 pm #417762Hey!
Do you mind creating a temporary admin login and posting it here privately? Also please post the code you used using – http://pastebin.com/
Regards,
YigitJune 1, 2015 at 7:12 pm #452714Hey Yigit,
i tried to alter the code above to just get an other URL at my logo – and created the following code in my functions.php :
add_filter('avf_logo_link','av_change_logo_link'); function av_change_logo_link($link) { $link = "http://www.the-other-link.comife/"; return $link; }
It does not crush my wordpress ( that´s good ) – but it also does not work ;)
Do you have any idea ?
Thanx in advance !
StefanJune 1, 2015 at 7:21 pm #452717Hi!
Do you mind creating a temporary admin login and posting it here privately Stefan? :)
Regards,
YigitJune 1, 2015 at 7:47 pm #452721This reply has been marked as private.June 1, 2015 at 8:21 pm #452732Hey!
Please review your website now. The way you commented out the description above the function was wrong, i fixed it :)
Best regards,
YigitJune 2, 2015 at 12:04 am #452849He Yigit,
thanx a lot – now it works …
And for all other people seeking for the solution … my code mentioned above is correct !
Regards
Stefan -
AuthorPosts
- The topic ‘Different logo with different link’ is closed to new replies.