Support » Themes and Templates » How to remove the categories in the navigation bar?

  • Hello all, I am new to creating websites and WordPress and I have a frustrating problem. On my main bar, i guess called the navigation bar, every time I make a new post and give it a category, the category shows up on that bar. I don’t want them there. Here’s the link to my website: See the Montreal Canadiens and IIFH on the main bar? What I eventually want there is access to different pages like a contact us page etc..

    Can anyone help? Sorry if my terminology is complicated, I am a complete noobie about this stuff but I think you guys know what I am talking about.

    Thanks in advance!

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi, It really depends on your theme. For most themes, the code for the nav bar is in the header.php file.

    This page will tell you how to edit your theme files

    You’ll want to find the section that is printing out each category and comment it out. Then you’ll want to add code to print out each page. I’ve got a sample here

    Hope this helps!

    Look for all calls to:


    And comment them out. Don’t remove them, leave them in just in case you need to reuse them again.

    For example, in the Twenty Eleven theme you will see in header.php something like this:

    <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>

    To comment out do this:

    <?php // wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>

    Like aliseya said above, it depends on the theme, but typically you’ll just need to comment out that function call in your theme files (there may be more than one)

    Hey guys, thanks a lot for taking the time to help me out. Your information definitely helped further my understanding of WordPress but I am still stuck. Lol

    In the editor, I can’t find any coding with the terms “navigation bar” or “nav” etc..As you guys said, maybe it’s coded differently and it depends which theme I am using..I’m just gonna go ahead and paste all the coding, and if someone can help me, I will be super

    I am using the Denitto Theme.

    Thanks again and sorry for being a pain…

    [the forum limit for posting code directly is 10 lines – please use the pastebin for any codes that are longer, or post a link to your site if you need to reference the CSS code]



    Forum Moderator

    try to locate a <div class="menu-secondary-container"> with the menu code in header.php (?) of your theme, and remove the code inclusive the </div> that belongs to it;

    if that does not work, try to hide the menu with css:
    .menu-secondary-container { display: none; }
    add this to style.css of your theme

    Thank you!

    That was great, I was successfully able to hide to menu with:
    .menu-secondary-container { display:none; }

    I would also like to acutally keep the menu…but instead of having the categories of my articles listed on that menu bar, I would like it to be links to different pages..

    I’m not sure if I’m explaining this properly but thanks anyways!



    Forum Moderator

    instead of having the categories of my articles listed on that menu bar, I would like it to be links to different pages..

    you need to locate where the code for that menu is – possibly in header.php?

    you can paste the full code of header.php into a and post the link to it here if you need assistance.

    Hey thanks for the help alchymyth.

    Here’s the coding. I can’t find anything relating in the header, but then again, I don’t know much about coding lol.

    Thanks again!



    Forum Moderator

    the pasted file looks like a stylesheet – is there no header.php in your theme?

    dashboard – appearance – editorHeader (header.php)

    Sorry about that.

    Thank you.



    Forum Moderator

    the theme coding is more complex than ‘usual’ – there might be options from the dashboard to change the menues (?)

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to remove the categories in the navigation bar?’ is closed to new replies.