__( 'Primary Navigation(Header)', 'best-blog' ), 'top-bar' => esc_html__( 'Top bar menu', 'best-blog' ) ) ); function bestblog_top_bar() { wp_nav_menu(array( 'container' => false, // Remove nav container 'menu_class' => ' menu', // Adding custom nav class 'items_wrap' => '', 'theme_location' => 'top-bar', // Where it's located in the theme 'depth' => 1, // Limit the depth of the nav 'fallback_cb' => false, // Fallback function (see below) )); } // The Top Menu function bestblog_top_nav() { wp_nav_menu(array( 'container' => false, // Remove nav container 'menu_class' => 'horizontal menu align-center ', // Adding custom nav class 'items_wrap' => '', 'theme_location' => 'primary', // Where it's located in the theme 'depth' => 5, // Limit the depth of the nav // Fallback function (see below) 'walker' => new Topbar_Menu_Walker() )); } // Big thanks to Brett Mason (https://github.com/brettsmason) for the awesome walker class Topbar_Menu_Walker extends Walker_Nav_Menu { function start_lvl(&$output, $depth = 0, $args = Array() ) { $indent = str_repeat("\t", $depth); $output .= "\n$indent