Quantcast
Viewing all articles
Browse latest Browse all 11471

viraguen on "Polylang in Bootstrap WP"

Thanks Chouby!!
Yes, this is the theme.
We tried to change some things. In functions.php we changed

register_nav_menus( array('main-menu' => __( 'Main Menu', 'bootstrapwp' ),
) );

to this:

register_nav_menus( array('primary' => __( 'Top menu', 'Menu Español' ),
) );

Then in header.php we changed

wp_nav_menu( array(                                              'menu' => 'main-menu',
'container_class' => 'nav-collapse',
'menu_class'      => 'nav',
'fallback_cb'     => '',
'menu_id' => 'main-menu',
'walker' => new Bootstrapwp_Walker_Nav_Menu()
) );

to this

wp_nav_menu( array(                                              'theme_location' => 'primary',
'container_class' => 'nav-collapse',
'menu_class'      => 'nav',
'walker' => new Bootstrapwp_Walker_Nav_Menu()
) );

The result was that we had the "Menu Español" items appearing as menu in English (items names, or page names, in english) and Spanish (items names, or page names, in spanish) without the language switcher which we added to the menu. (We created two different menus, one with the name "Menu Español" and another with the name "Top menu", we did this in order to check changes, but actually we need the same menu, with the same items, but in different languages)
In addition, it seems that the "Theme locations" control in Appearance->Menus is not working because when we set "Main Menu English" to "Top menu" and "Main Menu Español" to "Menu Español" and we saved, if we switched to another page and then came back, this control is not set.

Thanks again...


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>