Title: [Plugin: Multisite Language Switcher] Change the output
Last modified: August 20, 2016

---

# [Plugin: Multisite Language Switcher] Change the output

 *  Resolved [lissyg22](https://wordpress.org/support/users/lissyg22/)
 * (@lissyg22)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/)
 * Hi
 * First of all, thanks for this great plugin. I’m using it with my en/es website
   and it’s working perfectly, but there’s a thing I’d like to change. Right now
   the flags are showing in the header of my website (cause I added the function
   you said in the [wiki ](https://github.com/lloc/Multisite-Language-Switcher/wiki/Generate-the-output)
   in the header.php of my theme) but I would like it to appear in my navigation
   menu instead. I saw the “Manipulate the Navigation Menu” part in the same wiki
   but I still don’t understand where I would have to add this code.
 * I know this could be a super dumb question, but I’m new at this.
    Thanks in advance.
 * Lissy
 * [http://wordpress.org/extend/plugins/multisite-language-switcher/](http://wordpress.org/extend/plugins/multisite-language-switcher/)

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/page/2/?output_format=md)

 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020226)
 * No problem. You can insert the code in your functions.php of your theme.
 *  [bellechan](https://wordpress.org/support/users/bellechan/)
 * (@bellechan)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020276)
 * Hi, I am also trying to put the switcher in the menu. I copied the code “as is”(
   except that I changed the menu name) in the functions.php file of my theme but
   absolutely nothing happens. Did I need to change, add, remove anything from the
   code? (I don’t know PHP so can hardly figure it out just with the instructions
   given). Is there something I can do to check why it’s not “acting on” the function?
 * I am pretty sure that the plugins’s settings are all ok since the widget works
   if I activate it. Thank you!
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020277)
 * This is the solution if you want the switcher integrated in your WordPress menu.
   But there are other ways to create a similar output. Can you give me an example?
   Is there already a site where I can see something?
 *  [bellechan](https://wordpress.org/support/users/bellechan/)
 * (@bellechan)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020278)
 * Thank you for your quick reply.
 * This is the site I am trying to put the language switcher on : [http://www.prestigeexperts.com/fr/](http://www.prestigeexperts.com/fr/).
   I have searched in the source code to see if anything was there but was not showing
   in the page, but there is nothing. I am using a bought theme, maybe there is 
   something conflicting?
 * I have activated the widget feature in the footer so you can see that this part
   is working properly.
 * Ideally I would like to have the description link (no flag) in the secondary 
   menu on the left (beside “Accueil | Contact”).
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020279)
 * The name of the menu seems to be “top_menu”, isn’t it?
 *  [bellechan](https://wordpress.org/support/users/bellechan/)
 * (@bellechan)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020280)
 * Yes, it seems like it… I have tried “top” and “top_menu” instead of “primary”
   in the code, but it doesn’t make it work. It is currently set as “top_menu”.
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020281)
 * Could you check in your functions.php if the id of the menu is really top_menu?
   There must be at least one call to the function wp_nav_menu.
 *  [bellechan](https://wordpress.org/support/users/bellechan/)
 * (@bellechan)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020282)
 * Haa! thank you so much 🙂 Turns out the only call to wp_nav_menu was in the header.
   php. I was able to see there that the menu id was really top_menu, but it’s “
   theme location” was top-menu… Thank you again!!
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020285)
 * OK, excellent!!
 *  [Photoed](https://wordpress.org/support/users/photoed/)
 * (@photoed)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020305)
 * Hi,
 * I’d like to place the flags into the menu on my site too.
 * I’ve copied the code from [here](https://github.com/lloc/Multisite-Language-Switcher/wiki/Generate-the-output)
   into my functions.php file but nothing happens.
 * I’m running twentytwelve here – [Photoed](http://www.photoed.co.uk).
 * Can you help at all please?
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020306)
 * I use Twenty Twelve on my [test-installation](http://test.lloc.de/). Could you
   please check if your menu-function is similar to my [function my_custom_menu_item](https://github.com/lloc/My-Test-Env/blob/master/MyTestEnv.php).
 *  [Photoed](https://wordpress.org/support/users/photoed/)
 * (@photoed)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020307)
 * Hi,
 * Thanks for the swift reply.
 * The menu function in my functions.php is
 *     ```
       // This theme uses wp_nav_menu() in one location.
       	register_nav_menu( 'primary', __( 'Primary Menu', 'twentytwelve' ) );
       ```
   
 * Apologies if this is not the correct information. I am not particularly knowledgeable
   about code.
 *  Plugin Author [Dennis Ploetner](https://wordpress.org/support/users/realloc/)
 * (@realloc)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020308)
 * OK, so you could insert this code in your functions.php (I hope you are using
   a [Child Theme](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/codex.wordpress.org/Child_Themes?output_format=md)):
 *     ```
       function my_custom_menu_item( $items, $args ) {
           if (
               class_exists( 'MslsOutput' ) &&
               'primary' == $args->theme_location
           ) {
               $obj = new MslsOutput;
               $arr = $obj->get( 2 );
               if ( !empty( $arr ) ) {
                   $items .= '<li>' . implode( '</li><li>', $arr ) . '</li>';
               }
           }
           return $items;
       }
       add_filter( 'wp_nav_menu_items', 'my_custom_menu_item', 10, 2 );
       ```
   
 * Cheers!
 *  [Photoed](https://wordpress.org/support/users/photoed/)
 * (@photoed)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020309)
 * I have copied that code into the functions.php of my (newly created, thanks) 
   child theme but it doesn’t seem to have any effect on the menu.
 * I have the plugin working perfectly from the sidebar widget so I know it’s not
   a fault with the plugin generally.
 * I would like for it to show in the menu too since I prefer not to have the sidebar
   activated on the front page.
 * Thanks again for your assistance.
 * Edward
 *  [Photoed](https://wordpress.org/support/users/photoed/)
 * (@photoed)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/#post-3020310)
 * In fact, don’t worry.
 * I will change my site to have the sidebar on the front page too.
 * It would be the simplest solution I think.

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/page/2/?output_format=md)

The topic ‘[Plugin: Multisite Language Switcher] Change the output’ is closed to
new replies.

 * ![](https://ps.w.org/multisite-language-switcher/assets/icon-256x256.png?rev=
   2793358)
 * [Multisite Language Switcher](https://wordpress.org/plugins/multisite-language-switcher/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multisite-language-switcher/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multisite-language-switcher/)
 * [Active Topics](https://wordpress.org/support/plugin/multisite-language-switcher/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multisite-language-switcher/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multisite-language-switcher/reviews/)

 * 17 replies
 * 4 participants
 * Last reply from: [Photoed](https://wordpress.org/support/users/photoed/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/plugin-multisite-language-switcher-change-the-output/page/2/#post-3020312)
 * Status: resolved