Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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

    #406025

    Hey 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,
    Yigit

    #417731

    Yigit,

    It worked well, (for a while).

    After that, the page gone “blank”.

    I removed the code and the page came back to normal.

    Newton

    #417762

    Hey!

    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,
    Yigit

    #452714

    Hey 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 !
    Stefan

    #452717

    Hi!

    Do you mind creating a temporary admin login and posting it here privately Stefan? :)

    Regards,
    Yigit

    #452721
    This reply has been marked as private.
    #452732

    Hey!

    Please review your website now. The way you commented out the description above the function was wrong, i fixed it :)

    Best regards,
    Yigit

    #452849

    He Yigit,

    thanx a lot – now it works …

    And for all other people seeking for the solution … my code mentioned above is correct !

    Regards
    Stefan

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Different logo with different link’ is closed to new replies.