Title: [Plugin: Polylang] Problems with menu
Last modified: August 20, 2016

---

# [Plugin: Polylang] Problems with menu

 *  Resolved [bazz](https://wordpress.org/support/users/lucicmirko/)
 * (@lucicmirko)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-polylang-problems-with-menu/)
 * Hi! Great plugin but I have some problems with menu.
 * I read other topics about this problem but I didn’t find solution.
 * In case I set wp_nav_menu this way:
    `wp_nav_menu(array('menu' => 'Top Menu','
   container' => '', 'fallback_cb' => 'wp_page_menu', 'echo' => false, 'depth' =
   > 2));` I have problems: -No home page link -When I change language, content 
   language is changed but menu language don’t change
 * In case I set wp_nav_menu this way:
    `wp_nav_menu(array('theme_location' => '
   Top Menu', 'container' => '', 'fallback_cb' => 'wp_page_menu', 'echo' => false,'
   depth' => 2));` – No home page link – In menu now I have alphabetically ordered
   pages in that language (it ignore custom menu I made)
 * Any solutions?
 * [http://wordpress.org/extend/plugins/polylang/](http://wordpress.org/extend/plugins/polylang/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-polylang-problems-with-menu/#post-2592294)
 * The first code will not work because if you hardcode the menu, then Polylang 
   will intentionally let it unchanged.
 * The second should work because it sets the theme_location and not the menu. However
   I did not test all combinations of arguments.
 * The following code works for sure:
 *     ```
       <?php wp_nav_menu( array('theme_location' => 'primary' ) ); ?>
       ```
   
 * Once you have created your different menus, just go to the Settings->languages-
   >menus page and assign the different menus to the theme location (in your case‘
   Top menu’, for twenty ten ‘primary) and each language.
 * You can add / remove arguments to check which one breaks things.
 * NB:
    ‘fallback_cb’ => ‘wp_page_menu’ is useless as it is the default value. Custom
   nav menus do not create the home link automatically (not linked to Polylang).
   You must explicitly add it.
 *  Thread Starter [bazz](https://wordpress.org/support/users/lucicmirko/)
 * (@lucicmirko)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-polylang-problems-with-menu/#post-2592311)
 * Theme I used have some ‘strange’ functions for displaying menu.
    I deleted it
   and added in functions.php
 * `register_nav_menu( 'primary', 'main_menu' );`
 * And in header.php file of my theme:
 * `<?php wp_nav_menu( array('theme_location' => 'primary' ) ); ?>`
 * Probably I will add more arguments to wp_nav_menu() but now everything works 
   fine 😀
 * Thank you for your time!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Polylang] Problems with menu’ is closed to new replies.

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

 * 2 replies
 * 2 participants
 * Last reply from: [bazz](https://wordpress.org/support/users/lucicmirko/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-polylang-problems-with-menu/#post-2592311)
 * Status: resolved