Pro: Language switcher in top bar

Hi

How can I put the ITA e ENG in the top bar, next to the social icon? (left position)
I create the file _topbar.php in wp-content/themes/pro-child/framework/views/global/
but I don’t have a results. :slightly_frowning_face:

Thanks!!

<?php

// =============================================================================
// VIEWS/GLOBAL/_TOPBAR.PHP
// -----------------------------------------------------------------------------
// Includes topbar output.
// =============================================================================

?>

<?php if ( x_get_option( 'x_topbar_display' ) == '1' ) : ?>
<?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?>

<?php echo x_get_option( 'x_topbar_content' ); ?>

    <?php pll_the_languages( array( 'show_names' => 1 ) ); ?>
<?php endif; ?> <?php x_social_global(); ?>
<?php endif; ?>

Hi @fra_fantasy,

I can see you are using PRO Header. That approach editing the template to add the language switcher will only work if you are using Legacy header. Since you built your header using the header builder(so you have PRO header on your site), you can add wpml languange switcher in the builder too. You may add a content or text element then add the language switcher shortcode inside.

Hope this helps.

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