Support » Plugin: Multisite Language Switcher » Navigational Menu

  • Resolved andrewfong


    Firstly, wonderful plugin – thanks for the time you put into this.

    Here’s my problem. I have designed a site for my friend who is starting a business – he didn’t tell me he wanted it in 3 languages until a week into the implementation. Anyway, I have settled on a multisite solution. Its all going smoothly, I have the 3 sites setup.

    My website:

    I would like the language switcher in the navigational menu. Is this possible? I have very little knowledge of PHP or css so any help is greatly received.

    The theme I am using across the 3 sites is ‘TheOnePager’, by Woothemes.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Dennis Ploetner


    Thanks for the reply. I have tried the final method with no luck – is there a way of viewing the page source to find out what the table is called in my theme?

    Plugin Author Dennis Ploetner


    Yes, look for a call to register_nav_menu or register_nav_menus in the functions.php of your theme. Maybe you’ll find it there.

    Thanks realloc – I’ll try that now & post results asap.

    No luck. Any other thoughts?

    Ok no so ‘register_nav_menu’ or menus in the functions.php.

    I have found the correct section located in the theme-functions.php of my theme in the editor.

    /* Register WP Menus */
    if ( function_exists( 'wp_nav_menu') ) {
    	add_theme_support( 'nav-menus' );
    	register_nav_menus( array( 'top-menu' => __( 'Top Menu', 'woothemes' ) ) );

    Adding this

    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 .= ‘

  • ‘ . implode( ‘
  • ‘, $arr ) . ‘
  • ‘;
    return $items;
    add_filter( ‘wp_nav_menu_items’, ‘my_custom_menu_item’, 10, 2 );

    doesn’t do anything. What should I change and where should I insert it?

    Plugin Author Dennis Ploetner


    Seems the menu called ‘top-menu’ and not ‘primary’. Just change this and it will work.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Navigational Menu’ is closed to new replies.