Adding Additional Menu in Wordpress Site

I am trying to add an additional menu above Main Navigation in the header of my Wordpress site.

Currently I have the following Code in my functions.php...

/*Top Menu Navigation */

register_nav_menu( 'topnav', __( 'Top Nav Menu', 'customizr' ) );

/* Main Menu Navigation */

add_filter('tc_menu_display', 'acub_menu_display');
function acub_menu_display($output) {
    echo preg_replace('| class="dropdown-toggle" data-toggle="dropdown" data-target="#"(.+?)<b |', ' class="a-stripped" $1</a><a href="#" class="dropdown-toggle a-caret" data-toggle="dropdown" data-target="#"><b ', $output, -1);


I have the following code in my header.php, and I see the menu items above all pages including the dashboard and it breaks my wordpess administration pages.

wp_nav_menu( array( 'theme_location' => 'topnav', 'container_class' => 'topnav-menu' ) );

I am not yet comfortable working with PHP.

Here is the placement in my code.

<!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<!--[if !(IE 7) | !(IE 8)  ]><!-->
<html <?php language_attributes(); ?>>                          
<?php tc__f('rec' , __FILE__ , __FUNCTION__ ); ?>

      <?php do_action( '__before_body' ); ?>

      <body <?php body_class(); ?> itemscope itemtype="">
            <?php do_action( '__before_header' ); ?>

 wp_nav_menu( array( 'theme_location' => 'topnav', 'container_class' => 'topnav-menu' ) );

               <header class="tc-header clearfix row-fluid" role="banner">
                  <?php do_action( '__header' ); ?>


             //This hook is filtered with the slider
            do_action ( '__after_header' )
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

James RodgersWeb Applications DeveloperCommented:
it is breaking your layout due to being processed for the nav bar.

why are you pushing it through tc_menu_display? it is not necessary.

what is it you want to do?see on output?
deitercat2Author Commented:
I want the additional nav bar to appear above/ before the main menu navigation,

I want something similar to the sub navigation on  this site:
except I want the additional nav on the top.
James RodgersWeb Applications DeveloperCommented:
just take out the filter, what you see on that site is just a menu with a different style
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

deitercat2Author Commented:
Ok, I have gone back to the beginning.  I have stripped out everything and placed

register_nav_menu( 'topnav', __( 'Top Nav Menu', 'customizr' ) ); into my functions.php.

So my question is what should I have in my header.php and where should I place it so that the menu appears before the header menu.

I have not made changes in my header.php file it is the same as what is above.

Thank you.
James RodgersWeb Applications DeveloperCommented:
above the header menu add this

 wp_nav_menu( array( 'theme_location' => 'topnav', 'container_class' => 'topnav-menu' ) );

that's it

I have used this same code to have multiple menus in a header

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
deitercat2Author Commented:
I appreciate your help.  Thanks for you patience.
James RodgersWeb Applications DeveloperCommented:
did it work?
deitercat2Author Commented:
It worked and is now showing up at the top of my pages but I placed it in the functions.php file.   The menu is also showing at the top of all my dashboard pages.
James RodgersWeb Applications DeveloperCommented:
ok try this

if(! is_admin()){

put menu code here
deitercat2Author Commented:
That worked.  Thank you again.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.