Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1321992

    Hello,
    I created my page in GERMAN and added the Polylang Plugin to translate it in English.
    Now, in my English version the logo, but just the logo, links to the wrong URL. It links to /en/ instread of /en/home-2 – as my English Home Page is called. I tried to rename it to /en/ but the system doesn’t let me. Is there a code I can add to force the ENGLISH LOGO to link to /en/home-2 instead of just /en/
    Thanks Nora

    #1322148

    Hi Nora,

    I’m not sure I fully understand the problem you are having, but if your home page is set correctly, then /en/ and /en/home-page-name should end up in the correct place, right? If you need further help, then please post a link to where we can see the actual problem on your site.

    Best regards,
    Rikard

    #1322158

    Well, no – that’s the problem. My English Homepage is called /en/home-2, but the logo of the English version links to /en/ only. I tried to get rid off the /home-2 extension in the URL, but it doesn’t let me. So it’s probably easier to redirect the EN Logo to /en/home-2 page through custom coding?
    Maybe you see

    #1322172

    can you try this in your child-theme functions.php:
    see : Link

    function av_change_logo_link_for_polylang_lang($link){
        if(pll_current_language() == 'en'){
            $link = "https://kriesi.at";
        }
        return $link; 
    }
    add_filter('avf_logo_link','av_change_logo_link_for_polylang_lang');

    on default we can try this too – i do not test it yet as if clause:
    if (get_locale() == 'en_GB') {

    #1322177

    awesome – this worked out just fine.
    Thanks so much. Nora

    #1322247

    Hi Nora,

    Great, I’m glad that you got it working, and thanks to @guenni007 for helping out :-)

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.