WP Menu Problem
-
got a weird problem! I am creating a theme for a new client and I cannot get the menu to show up on the public side of the site!
On the admin backend under apperance > menus it works perfectly!
I am also using the exact same wp_menu array I have used in all of my themes.
I have also set up the wp_menu function in my functions.php page! For those that want to see it here is my code…<nav class="top-links" role="navigation"> <?php wp_nav_menu(array( 'menu' => 'primary', 'theme_location' => 'primary', 'depth' => 2, 'container' => 'div', 'container_class' => 'top-links-nav', 'fallback_cb' => 'wp_bootstrap_navwalker::fallback', 'walker' => new wp_bootstrap_navwalker()) ); ?> </nav>
and here is the function
/* Register the Nav Menu */ function register_my_menus() { require_once('wp_bootstrap_navwalker.php'); register_nav_menus(array( 'primary' => _( 'Primary Menu' ), 'header-top-menu' => _( 'Header Top Menu' ) )); } add_action( 'init', 'register_my_menus' ); /* End the Nav Menu */
Many thanks in advance
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘WP Menu Problem’ is closed to new replies.