Add support for custom header-Conditional WPML

Community Forums Forums General Discussion Add support for custom header-Conditional WPML

This topic is: not resolved

This topic contains 3 replies, has 3 voices, and was last updated by  laflamme3e 6 months, 2 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #94820

    Treefungus
    Participant
    Post count: 51

    Hi

    I was wondering if its possible to conditionally add support for custom header based on WPML language?

    Right now I cannot have 2 different logos unless I remove the support for custom header and add the logo manually in the CSS and target the French logo using WPML body class. However this is not so user-friendly for the website owner.

    I have googled and found many solutions however these all include changing the header.php which is not great to do in a Genesis theme.

    Appreciate any help I can get

    #94836

    braddalton
    Participant
    Post count: 9922

    Is there any conditional tags for languages?


    #94854

    Treefungus
    Participant
    Post count: 51

    I am using this to add a body class. Can this be used as a conditional tag?

    function wpml_lang_body_class($classes) {
    if(defined(‘ICL_LANGUAGE_CODE’)) {
    $classes[] = “” . ICL_LANGUAGE_CODE;
    }

    return $classes;
    }
    add_filter(‘body_class’,’wpml_lang_body_class’);

    #95432

    laflamme3e
    Member
    Post count: 9

    I have the same problem… Does anyone know a solution for this?

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

You must be logged in to reply to this topic.