WPML change logo code missing from documentation

The support forum is open for members only. To add a topic or reply in the forum, please login or register.

Support Forum Moved
The Pojo Themes support has been transferred to a faster and more personal ticketing platform, so the forums are no longer active.
  • If you want to learn how to use Pojo themes, check out our extensive documentation guides.
  • Need help with using our themes? Contact us with a detailed explanation of your issue in the support page.
  • Have a pre-sale question or other inquiry? Feel free to contact us about it.

Support Forums Support (Legacy) WPML change logo code missing from documentation

This topic is: Resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1358

    Arthur Kendall
    Participant

    Hi,

    First of all great job guys on an amazing theme – I’m like a kid in a sweet shop!

    One thing: I’m building a multilingual site and using a child theme to change things; in the comprehensive documentation on this site, there is a page on how to do it, but it is missing the code snippet required for the child theme. Could you paste it here and/or update the page please?! I need it urgently!

    WPML: How to Change the Logo in the Theme for every Language

    Thanks,
    Arthur

    #1360

    Boaz
    Keymaster

    Hi Arthur,

    This is the code:

    function pojo_wpml_get_multilang_logo( $value ) {
    if ( defined( ‘ICL_LANGUAGE_CODE’ ) ) {
    $logos = array(
    ‘en’ => ‘logo-en.png’,
    ‘he’ => ‘logo-he.png’,
    );
    $default_logo = $logos[‘en’];
    $current_lang = ICL_LANGUAGE_CODE;
    $assets_url = get_stylesheet_directory_uri() . ‘/assets/images/’;

    if ( isset( $logos[ $current_lang ] ) )
    $value = $assets_url . $logos[ $current_lang ];
    else
    $value = $assets_url . $default_logo;
    }
    return $value;
    }
    add_filter( ‘theme_mod_image_logo’, ‘pojo_wpml_get_multilang_logo’ );

    #1361

    Noa
    Keymaster

    You can also refresh the documentation, we’ve added the code.

    #1362

    Arthur Kendall
    Participant

    Hi Boaz,

    Thanks for that. So all I need to do is add the different icons to the /assets/images folder, right?

    Is there a repository of language files anywhere to avoid having to translate all the strings? One of the languages I need is Spanish, so I assume someone must have done this one before! It’s not a big deal as there aren’t that many strings that will be visible to the visitor and most clients understand a minimum of English (since the ones that want languages want English as an option!), but it would save time, which is limited.

    Thanks,
    Arthur

    #1363

    Arthur Kendall
    Participant

    Hi Noa – clearly I hadn’t read your reply before posting (didn’t refresh the page!) You can mark this as closed/resolved 🙂

    Thanks and I hope others will benefit from this little intervention 🙂

    Arthur

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

The forum ‘Support (Legacy)’ is closed to new topics and replies.