Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #387261

    I have successfully added a language switcher text (English – Français) in the Enfold header for my multisite that uses the MultilingualPress PRO plugin. For the record, here is the code I added to header.php using the Themes Editor in WordPress.

    if( function_exists( 'mlp_show_linked_elements' ) ) :
    mlp_show_linked_elements( 
    array(
    'link_text' => 'text', // oder 'text' oder 'text_flag'
    'show_current_blog' => FALSE
    ) 
    );
    endif;
    

    I discovered that by adjusting where in the header.php file I added this code, I could make the language switcher text appear above the Header and Header Secondary Menu to a brand new area. I also followed the advice in this forum and added this CSS code in WordPress admin in the Enfold – General Styling – Quick CSS box to adjust the language switcher text to the right side.

    
    .mlp_language_box {
    float: right;
    margin-right: 7%;
    }

    However, I would prefer if the language switcher text (English – Français) could appear either as a menu item in the Header or Header Secondary Menu. Is there a way to place the PHP text above so that it appears in one of those locations?

    • This topic was modified 9 years, 2 months ago by darryllevine.
    #387780

    Hi darryllevine!

    Thank you for using our theme.

    Have a look into enfold\includes\helper-main-menu.php.

    This is th file, where the header is built. You find action hooks to add your switcher or you can modify the core file to add it, where you want to have it.

    Hope, this will help you.

    Come back, if you need further assistance.

    Cheers!
    Günter

    #387928

    SOLVED
    Your idea worked. For the record, I added the language switcher code in between the following lines in helper-main-menu.php using the WordPress Theme Editor.

    if($phone) { echo "<div class='phone-info {$phone_class}'><span>".do_shortcode($phone)."</span></div>"; }
    and
    ?>

    Thanks so much.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Position of language switcher in header’ is closed to new replies.