Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #352959

    tblaye
    Participant

    Hi,

    I tried this https://community.theme.co//forums/topic/inserting-wpml-language-switcher/ but the language flags end up left against the slogan.

    Plus, the it erases all margin between the browser and the page content (left & right).

    I’d like to maintain the width of the topbar and have the flags on the right next to my social media icons.

    Any ideas ?

    Many thanks !

    tblaye

    #352997

    Darshana
    Moderator

    Hi there,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #353029

    tblaye
    Participant
    This reply has been marked as private.
    #353142

    Nabeel A
    Moderator

    Hi again,

    Thank you for providing the URL, I am not able to see the flags in your Topbar. Can you please put them back so we can take a closer look and suggest a fix.

    Thanks!

    #353229

    tblaye
    Participant

    Hi Themeco,

    I reloaded the _topbar.php

    Here’s the effect : http://www.infuseyourlife.eu/

    Many thanks for your help !

    #353328

    Rue Nel
    Moderator

    Hello There,

    Please us this code instead:

    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_TOPBAR.PHP
    // -----------------------------------------------------------------------------
    // Includes topbar output.
    // =============================================================================
    
    ?>
    
    <?php if ( x_get_option( 'x_topbar_display', 0 ) == 1 ) : ?>
    
      <div class="x-topbar">
        <div class="x-topbar-inner x-container max width">
          <?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?>
          <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p>
          <?php endif; ?>
          <?php do_action('icl_language_selector');?>
          <?php x_social_global(); ?>
        </div>
      </div>
    
    <?php endif; ?>

    And you need to add this css code in your child theme’s style.css file

    /* WPML custom styles */
    .wpml-selector {
        float: right;
    }
    
    .wpml-selector #lang_sel_list a {
        background-color: transparent;
        padding: 8px 4px;
    }

    If you want to switch the social icons and the WPML flags, you simply switch this code:

    <?php x_social_global(); ?>
    <?php do_action('icl_language_selector');?>

    Please let us know if this works out for you.

    #353599

    tblaye
    Participant

    Hi guys,

    Thanks for your help.

    With your help and some other code from a WPML forum, I managed to piece this together:
    ————————————————————————————
    .wpml-selector {
    float: right;
    }
    .wpml-selector #lang_sel_list a, #lang_sel_list a:visited,
    #lang_sel_list ul a, #lang_sel_list_list ul a:visited {
    background:transparent !important;
    padding: 8px 4px 4px 10px ;
    }
    ————————————————————————————

    The only thing still not working is that the flags aren’t floating right against the social media icons.

    Tried a few things but it still won’t work…

    #353612

    Thai
    Moderator

    Hi There,

    Please try following CSS:

    #lang_sel_list {
    float: right;
    }

    Hope it helps.

    #357429

    tblaye
    Participant

    Hi Themeco,

    That did it !

    Thank you 😉

    #357566

    Nabeel A
    Moderator

    Glad it worked!

    Cheers 🙂