WordPress.org

Ready to get started?Download WordPress

Forums

How to remove the categories in the navigation bar? (12 posts)

  1. Binzler
    Member
    Posted 2 years ago #

    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: http://www.hockeyeveryday.com. 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!

  2. aliseya
    Member
    Posted 2 years ago #

    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
    http://codex.wordpress.org/Editing_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

    http://blog.xoxothemes.com/listing-each-page-in-your-wordpress-blog/

    Hope this helps!

  3. kobashicomputing
    Member
    Posted 2 years ago #

    Look for all calls to:

    wp_nav_menu

    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)

  4. Binzler
    Member
    Posted 2 years ago #

    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 grateful..lol

    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]

  5. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    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

  6. Binzler
    Member
    Posted 2 years ago #

    Thank you!

  7. Binzler
    Member
    Posted 2 years ago #

    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!

  8. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    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 http://pastebin.com/ and post the link to it here if you need assistance.

  9. Binzler
    Member
    Posted 2 years ago #

    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.

    http://pastebin.com/zLRJwLM3

    Thanks again!

  10. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

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

    dashboard - appearance - editor - Header (header.php)

  11. Binzler
    Member
    Posted 2 years ago #

    Sorry about that.

    http://pastebin.com/iGsKbDgW

    Thank you.

  12. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.