Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #897615

    Vojta
    Participant

    Hello, can you describe me step by step, how to place WPML switcher to the topbar?

    My website is http://www.fullon.cz

    thank you so much

    vojtech

    #898204

    Paul R
    Moderator

    Hi Vojtech,

    To achieve that, create file _topbar.php in wp-content/themes/x-child/framework/views/global then copy the code below into that file.

    
    <?php
    
    // =============================================================================
    // VIEWS/GLOBAL/_TOPBAR.PHP
    // -----------------------------------------------------------------------------
    // Includes topbar output.
    // =============================================================================
    
    ?>
    
    <?php if ( x_get_option( 'x_topbar_display' ) == '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 x_social_global(); ?>
          <span class="language-switcher"><?php do_action('icl_language_selector'); ?></span>
        </div>
      </div>
    
    <?php endif; ?>
    

    Hope that helps.