Tagged: 

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #1254099

    Dear Enfold team,
    I have recently encountered a hiccup.
    I am running two enfold websites, one for informational purposes and one for a cart checkout.
    At the moment my task is to link the logo on the checkout website back to the main website and the following solution previously found on the blog results in the website showing a white screen.

    add_filter(‘avf_logo’,’av_change_logo’);
    function av_change_logo($logo)
    {
    $currentlang = get_bloginfo(‘language’);
    if($currentlang==”en-US”)
    {
    $logo = “http://kriesi.at/wp-content/themes/kriesi/images/logo.png”;
    }
    if($currentlang==”fr-FR”){
    {
    $logo = “http://kriesi.at/wp-content/themes/kriesi/images/logo.png”;
    }
    return $logo;
    }

    Looking forward to your reply.
    Alexander

    #1254110

    Hi Alex,

    You can use this hook instead (just add the conditions inside it):

    function enfold_change_logo_link($link) {
        $link = "http://website.com";
        return $link;
    }
    
    add_filter('avf_logo_link','enfold_change_logo_link');

    Hope it helps.

    Best regards,
    Nikko

    #1254120

    Hi Nikko,

    Thank you for a quick reply!
    I have more than one language at the moment, I can see that you included code for one language. Would you be able to advise a snippet of code for both languages?
    I am not good at all with coding.

    Best,
    Alexander

    #1254124

    Hi Alexander,

    I see, please try to use this code (just change the links/url):

    function enfold_change_logo_link($link) {
        $currentlang = get_bloginfo('language');
        if($currentlang=="en-US") {
            $link = "http://website.com";
        } else {
            $link = "http://mywebsite.com";
        }
        return $link;
    }
    
    add_filter('avf_logo_link','enfold_change_logo_link');

    Best regards,
    Nikko

    #1254142

    Hi Nikko,

    Thank you lots for your help. Works perfectly!

    The only question is if I add another language in the future, would I just add another else { into the equation, as mentioned below?
    function enfold_change_logo_link($link) {
    $currentlang = get_bloginfo(‘language’);
    if($currentlang==”en-US”) {
    $link = “http://website.com”;
    } else {
    $link = “http://mywebsite.com”;
    } else {
    $link = “http://mywebsite.com”;
    }
    return $link;
    }

    add_filter(‘avf_logo_link’,’enfold_change_logo_link’);

    Best,
    Alexander

    #1254201

    Hi Alexander,

    We’re happy to hear that :)
    If you need to add another language you can use this code:

    function enfold_change_logo_link($link) {
        $currentlang = get_bloginfo('language');
        if($currentlang=="en-US") {
            $link = "http://english_website.com";
        } elseif($currentlang=="fr-FR") {
            $link = "http://french_website.com";
        } else {
            $link = "http://default_website.com";
        }
        return $link;
    }
    
    add_filter('avf_logo_link','enfold_change_logo_link');

    if a fourth language is added then just add this before else

    elseif($currentlang=="fr-FR") {
        $link = "http://french_website.com";
    }

    Best regards,
    Nikko

    #1254514

    Thank you thank you thank you !

    #1254517

    Dear Nikko,

    This would be off topic but I was wondering if you could see why the transparent menu does not work on the cart page in one of the languages?

    Here: https://shop.pearlsmile.com/de/

    Looking forward to your reply

    Best,
    Alexander

    #1254564

    Hi Alexander,

    Thanks for giving the link however I noticed when using a web inspector, it’s not tagged as a transparent header.
    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( to be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.

    Best regards,
    Nikko

    #1254761

    Hi Nikko,

    Thank you so much for taking a look at the issue!

    Best,
    Alexander

    • This reply was modified 4 years ago by Nikko. Reason: security
    #1255171

    Hi Alexander,

    Thanks for giving us admin access.
    This is now fixed, the only difference was the background image in the Color Section.
    The one you gave that has does have an issue doesn’t have a background image to it.

    Best regards,
    Nikko

    #1255443

    Hi Nikko,

    Icant find a way to create another thread but I have yet another issue with the website which I can’t wrap my head around

    Everything works fine until I go to the website using a mobile device (tried an iPad and an Android phone). When I try to change the language it simply reloads the current one without going to the needed language.

    Hope to hear from you!

    Best,
    Alexander

    #1255532

    .

    • This reply was modified 4 years ago by Alex PS.
    #1255549

    Hi,

    Did you need additional help with this topic or shall we close?

    Best regards,
    Jordan Shannon

    #1255611

    Hi Jordan,

    I guess you can close the topic. Although I have said that I will torn off WPML I am still hesitant to build another language as a separate wordpress installation. Would you please still look at what could have caused the language switch problem?

    If not you can close the thread. Thank you for taking the time to answer and sorry for inconvenience.

    Alexander

    #1255736

    Hi Alexander,

    We would like to request you to create a new thread so this thread won’t get too long with multiple topics.
    We’ll be closing this thread and continue our conversation on a separate thread.

    Best regards,
    Nikko

Viewing 16 posts - 1 through 16 (of 16 total)
  • The topic ‘Link logo to another website’ is closed to new replies.