WordPress.org

Ready to get started?Download WordPress

Forums

Multisite Language Switcher
[resolved] How do I put language switcher in navbar? (11 posts)

  1. jwook
    Member
    Posted 1 year ago #

    How do I put language switcher in navbar?

    http://wordpress.org/extend/plugins/multisite-language-switcher/

  2. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    Please read this: https://github.com/lloc/Multisite-Language-Switcher/wiki/Generate-the-output You will find what you are looking for in the last paragraph.

  3. jwook
    Member
    Posted 1 year ago #

    I'm pretty new to wordpress so I am not sure where I would put that code that is shown in the last paragraph. Which .php file would I paste this into? and where in the file....

  4. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    You can put it at the end of the functions.php of your theme.

  5. jwook
    Member
    Posted 1 year ago #

    Do I paste exactly what is written in that last paragraph? Because when I do so, all I see is that text at the top of the webpage...

  6. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    Could you please give me an example where I can see it?

  7. jwook
    Member
    Posted 1 year ago #

  8. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    OK, I see. There is a nav-menu in /wp-admin/nav-menus.php defined, right? It seems that my code prints the output in the head-section (what quite strange is). Can you see a call to wp_nav_menu when you look in the header.php of your theme?

  9. jwook
    Member
    Posted 1 year ago #

    The only place the nav_bar is mentioned is in the portion of header.php that i pasted below:

    <!-- START HEADER -->

    <div id="header-wrapper">

    <div class="header clear">

    <div id="logo">
    "><img src="<?php echo get_option(BRANKIC_VAR_PREFIX."logo"); ?>" alt="" />
    </div><!--END LOGO-->

    <div id="primary-menu">
    <?php
    wp_nav_menu( array( 'theme_location' => 'primary-menu' ,
    'container' => false,
    'menu_class' => 'menu',
    'menu_id' => '',
    'fallback_cb' => 'header_fallback'
    ) );
    ?>
    </div><!--END PRIMARY MENU-->

    </div><!--END HEADER-->

    </div><!--END HEADER-WRAPPER-->

  10. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    OK, maybe it's easier if you insert right after

    wp_nav_menu( array( 'theme_location' => 'primary-menu' ,
        'container' => false,
        'menu_class' => 'menu',
        'menu_id' => '',
        'fallback_cb' => 'header_fallback'
    ) );

    this line

    if ( function_exists ( 'the_msls' ) ) the_msls();

    and then remove the code which you inserted in your functions.php before.

  11. realloc
    Member
    Plugin Author

    Posted 1 year ago #

    What about this issue? It's resolved?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.