Wpml language_selector - inside container

Hi there,

I added the code below in the _TOPBAR.PHP in child theme, but it is not respecting the container. How can I put it inside the container?

    <?php if ( x_get_option( 'x_topbar_display', 0 ) == 1 ) : ?>

  <div class="x-topbar">
    <div class="x-topbar-inner x-container-fluid 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(); ?>
      <div class="wpml-selector"><?php do_action('icl_language_selector'); ?></div>
    </div>
  </div>

<?php endif; ?>

Thanks

Hello Andre,

Thanks for writing in!

Please make use of this code instead for your _topbar.php 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(); ?>
      <div class="wpml-selector"><?php do_action('icl_language_selector'); ?></div>
    </div>
  </div>

<?php endif; ?>

We would loved to know if this has work for you. Thank you.

Hi,

Thanks, that worked!

:slight_smile:

You’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.