• Hope someone can help. I’ve searched through other support tickets for this issue and have spent a few hours trying to implement different solutions but it’s just not working for me.

    I have one site with a few pages in French. For those few pages I’d like the main menu to be French too. I’ve created two menus: “main” and “french”.

    I’ve looked at different solutions but am fairly confused about the best way to approach this. I understand I have to register the two menus, but in which functions.php file – the one in the wp-includes folder or the one in the theme folder?

    Also, I’ve seen solutions that suggest additional code goes in the header.php or the page template file. Which is the best one? Which is the best code to edit and add?

    Appreciate any help!

Viewing 10 replies - 1 through 10 (of 10 total)
  • the one in the wp-includes folder or the one in the theme folder?

    The one in your theme’s folder. You should never, ever, edit core WordPress files. What theme are you using? Where did you download it from?

    Thread Starter slj1111

    (@slj1111)

    I’m using the Modernize theme from Themeforest:

    https://themeforest.net/item/modernize-flexibility-of-wordpress/1264247

    Thanks for clarifying about the core WordPress files, that’s a start ??

    I’m sorry but as you are using a commercial theme, you need to seek support from the theme’s developer/vendor. We do not have access to, nor do we support, commercial products here. However, this codex section might give you some ideas.

    Sultan

    (@sultan_semmaiyahoocom)

    hello,

    for crate a menu you need to add in your theme function.php

    like
    <?php register_nav_menu( 'secondary', __( 'second Menu', 'your theme name' ) );?>

    where you want to show it put the following code there

    like

    <?php wp_nav_menu( array( 'theme_location' => 'secondary', 'menu_class' => 'your menu class' ) ); ?>

    and that’s it.

    Thread Starter slj1111

    (@slj1111)

    thanks Spyro. I’m not sure though what you mean about “where you want to show it put the following code there” – what file? And what bits of the code do I edit?

    See the section at the second link I posted above.

    Thread Starter slj1111

    (@slj1111)

    thanks Esmi, the theme developer says they don’t support my question and sent me here. So I guess I’m stuck unless someone else can help.

    See the section at the second link I posted above.

    Thread Starter slj1111

    (@slj1111)

    I did, but it’s for logged in vs not logged in users, we don’t have that. I will muddle around some more.

    Sultan

    (@sultan_semmaiyahoocom)

    where you want to show your second menu

    for example in footer?
    in header or what ever.

    put this code there

    <?php wp_nav_menu( array( ‘theme_location’ => ‘secondary’, ‘menu_class’ => ‘your menu class’ ) ); ?>

    it will show your secondary menu

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Can I have two different main menus on one site?’ is closed to new replies.