Help with removing navigation bar in Wordpress

7 replies
Hi Gang

You see the template here: New WP Themes

...well, most blog sites seem to have a pages navigation bar at the top (where it says Home, about, services etc) and then it has the categores navigation bar (where it says home, browsers, computers, etc).

How do I get rid of the categories bar (the one that's orange in this case) so that the site becomes more of a brochure type site rather than a blogging site? Any ideas?

Many thanks
Phil
#bar #navigation #removing #wordpress
  • Profile picture of the author pjCheviot
    Banned
    Hi Phil

    You will need to edit the header.php file to take out the reference to the "navcontainer" div at the bottom of the file.

    Either comment it out (in case you want to go back to the original at some point) or delete the lines altogether. Whatever you do - have a backup of the file! You never know!

    All the best.
    {{ DiscussionBoard.errors[2216654].message }}
  • Profile picture of the author Damien Roche
    ALWAYS make sure you back things up.

    You can either comment it out - preferred, delete all together OR hide it with css.

    CSS way is often a quick fix, but commenting out is the best way.

    Simply add this to your styles.css file:

    .navcontainer{display:none;}

    Simple. Let me know if you need any help, this literally a 10 second fix.
    Signature
    >> Seasoned Web Developer (CSS, JavaScript, PHP, Ruby) <<
    Available for Fixed Fee Projects and Hourly ($40/hr)
    {{ DiscussionBoard.errors[2216660].message }}
  • Profile picture of the author phil.wheatley
    GUYS!!! You are both awesome!!!!! Your suggestions have fixed the problem, both methods work.

    Thank you!
    Phil
    Signature



    It's still not working for you??? Need direction?...
    ---->>>> BrainDirection.com <<<<----
    {{ DiscussionBoard.errors[2216669].message }}
  • Profile picture of the author phil.wheatley
    Oh dear, now I'm being fussy but the only problem now is now that I have gotten rid of the bar completely (so the options don't show) the template looks a bit weird. Is there a way I can still have the bar, but without the categories showing? Sorry, I know I'm being fussy.

    I found this code in the header.php, maybe something to do with this??

    <div class="navcontainer">
    <ul id="nav">
    <li <?php if(is_home()) { echo ' class="current-cat" '; } ?>><a href="<?php bloginfo('url'); ?>">Home</a></li>
    <?php wp_list_categories('depth=1&hide_empty=0&orderby=n ame&order=ASC&title_li=' ); ?>
    </ul>


    Any ideas again would be awesome
    Phil
    Signature



    It's still not working for you??? Need direction?...
    ---->>>> BrainDirection.com <<<<----
    {{ DiscussionBoard.errors[2216681].message }}
  • Profile picture of the author Damien Roche
    Do you mean so you still have the bar, but without the items?

    If so, you simply need to remove this line:

    <?php wp_list_categories('depth=1&hide_empty=0&orderby=n ame&order=ASC&title_li=' ); ?>

    Although, to remove 'home' as well, delete this:

    <li <?php if(is_home()) { echo ' class="current-cat" '; } ?>><a href="<?php bloginfo('url'); ?>">Home</a></li>

    --

    So essentially, you will just have:

    <div class="navcontainer">
    <ul id="nav">
    </ul>
    </div>

    ..try that, and let me know if the nav still appears with the right height. Removing these elements *might* cause it to collapse.

    Hope that helps.
    Signature
    >> Seasoned Web Developer (CSS, JavaScript, PHP, Ruby) <<
    Available for Fixed Fee Projects and Hourly ($40/hr)
    {{ DiscussionBoard.errors[2216705].message }}
  • Profile picture of the author phil.wheatley
    Damien!!! YOUUUUU ARE THE MAN!!!!!!!!!!!!!!!!!!!!!!!!!!

    You know your stuff, that has totally done what I wanted, it now shows the bar, but without categories which is exactly what I wanted! People should pay attention to your signature file as you clearly know your stuff.

    Thanks a lot, I really appreciated, you've saved me a lot of hassle and work!

    Phil
    Signature



    It's still not working for you??? Need direction?...
    ---->>>> BrainDirection.com <<<<----
    {{ DiscussionBoard.errors[2216759].message }}
  • Profile picture of the author Damien Roche
    Appreciate it Phil! Glad you got it sorted.
    Signature
    >> Seasoned Web Developer (CSS, JavaScript, PHP, Ruby) <<
    Available for Fixed Fee Projects and Hourly ($40/hr)
    {{ DiscussionBoard.errors[2216766].message }}

Trending Topics