• Resolved LBA1403

    (@lba1403)


    Hi

    I tried to read the documentation about this, but I didn’t quite understand it.

    My problem is that I have three installed languages and one menu for each of the languages, but my site only shows the English version regardless of what language is chosen.

    I’ve understood as much as this has something to do with the menu-function in the functions.php

    In my custom theme that function is as follows:

    ‘if (function_exists(‘register_nav_menus’)) {

    register_nav_menus ( array(‘primary’ => ‘Header Navigation’));
    }’

    What do I need to change for it to work?

    Any help is strongly appreciated

    https://ww.wp.xz.cn/plugins/polylang/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Chrystl

    (@chrystl)

    Hi

    Could you paste here your wp_nav_menu.

    Thread Starter LBA1403

    (@lba1403)

    Hmm, it turns out I don’t have one. The only thing I have in my functions concerning menus is the register_nav_menus

    Plugin Support Chrystl

    (@chrystl)

    So ask to your theme author where is the wp_nav_menu function.

    Thread Starter LBA1403

    (@lba1403)

    I found my wp_nav_menu. Turns out it was in the header, not in the functions

    ‘<?php wp_nav_menu( array( ‘container_class’ => ‘main-nav’, ‘container’ => ‘nav’ ));?>’

    Plugin Support Chrystl

    (@chrystl)

    Your theme is buggy since it hasn’t ‘theme_location’.
    You should have this code below:

    <?php wp_nav_menu( array( 'theme_location' => 'primary', 'container_class' => 'main-nav', 'container' => 'nav' ));?>

    Ask to your theme author to fix this.

    Please specify your theme in this topic for other users who could have the same issue as you.

    Thread Starter LBA1403

    (@lba1403)

    Now it works perfectly. Thanks again, Chrystl!

    Hehe, I am sort of my own theme author. I made the theme following along a youtube-tutorial, and after that I’ve sort of expanded the site to able to fit my needs.

    This problem concern those who has followed the WP theme tutorial made by AwfulMedia.

    Hi Chrystl,

    I’m using the Responsive Pro Theme
    the wp_nav_menu looks like:

    <?php wp_nav_menu( array('container' => '','fallback_cb' => false,'menu_class' => 'top-menu','theme_location' => 'top-menu'));?>

    In Appearance > Menus > “Manage Location” tab I did select the menus for Theme Locations German and English.
    Since the last update of the Theme (I did an update to WP 4.2.1 too), the English Menu doesn’t work anymore!?) ;-(

    Thank you for help,
    phil

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

The topic ‘Menu doesn't change with language, custom theme’ is closed to new replies.