Tagged: 

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1275432
    #1275471

    I managed to make it work with the following code:

    // changes link for header logo
    add_filter(‘avf_logo_link’,’av_change_logo_link’);
    function av_change_logo_link($link)
    {
    $link = home_url(‘/subpage’);
    return $link;
    }

    Still I dont unterstand why it isnt working if I try to link any other page or if I am using the whole url not the home_url function.

    Well, I changed it again to try an external link again and now the version mentioned above isnt working anymore..

    I would appreciate any suggestions :)
    Greetings, Mylene

    • This reply was modified 3 years, 9 months ago by gugler.
    #1275611

    Hi Mylene,

    Where do you need it to lead to?

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

    #1275647

    because of: $link = home_url(‘/subpage’);
    you can use :

    add_filter('avf_logo_link','av_change_logo_link');
    function av_change_logo_link($link){   
        $link = get_site_url().'/subpage';
        return $link;
    }

    or with your home_url function:

    add_filter('avf_logo_link','av_change_logo_link');
    function av_change_logo_link($link){   
        $link = get_home_url().'/subpage';
        return $link;
    }

    what is the difference – on most cases : no difference – but look to your dashboard – settings – general
    there you got both defined.
    If you install your wordpress in a subfolder – then they differs.

    but subpage is still not defined – so what do you want to achieve

    • This reply was modified 3 years, 9 months ago by Guenni007.
    #1275671

    Thanks for your replies :)

    I have tried Guenni007 solutions but they arent working. Do I have to wait a specific amount of time till the changes are recognized?
    I cleared the cache aswell but no changes.

    Now I have the following code:
    // changes link for header logo
    add_filter(‘avf_logo_link’,’av_change_logo_link’);
    function av_change_logo_link($link)
    {
    $link = ‘https://conference.zeroproject.org/zeroprojectconference2021’;
    return $link;
    }

    Per default the logo is linking to ‘https://conference.zeroproject.org/’.
    According to other forum posts this should work but it doesnt.

    #1275739

    Hi gugler,

    Please update the theme to the latest version. That should fix any issues you are currently experiencing :)

    To update to the latest version follow the simple instructions here. (Or if you want the super detailed explanation you can read this blog post)

    Best regards,
    Victoria

    #1275748

    i see that you are not working with a child-theme!

    where did you enter the snippet?

    add_filter('avf_logo_link','av_change_logo_link');
    function av_change_logo_link($link){   
        $link = get_site_url().'/zeroprojectconference2021/';
        return $link;
    }

    Next: you have activated the merging of css and js files.
    Did you refresh those files ?

    #1275767

    I am currently new to this project so I just experienced that my changed did work but only for the main site of my wp multisite.
    So ‘https://zeroproject.org/’ is the main site of my multisite and the header logo is linking to the mentioned subpage.
    What I really want is, that the header logo of ‘https://conference.zeroproject.org/’ is linking to the mentioned subpage.

    I am sorry for missing the multisite detail.

    Thanks for your help!

    #1276604

    Hi,
    Sorry for the very late reply, please try this function instead.

    add_filter('avf_logo_link','av_change_logo_link');
    function av_change_logo_link($link){
    	$host = "conference.zeroproject.org";
    	if ($_SERVER['HTTP_HOST'] == $host) {
        $link = get_site_url().'/zeroprojectconference2021/';
    	} else {}
        return $link;
    }

    Then clear your browser cache and check.

    Best regards,
    Mike

    #1277266

    yes this little additional information that it is a multisite would have been good to know. ;)

    #1277606

    Hi,

    Thanks for helping out @guenni007 :-)

    Best regards,
    Rikard

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.