Forums

Removing 1 category from nav bar (2 posts)

  1. lee-bartlett
    Member
    Posted 3 years ago #

    How do i remove 1 category from the nav bar but leave the rest, I have 5 but only want to show 4 but the 5th needs to be a category, how do i remove that one from my nav bar?

  2. fmueller
    Member
    Posted 3 years ago #

    You can use an exclude argument in the page list in your sidebar.php.

    The code would look something like this:

    <?php wp_list_pages('exclude=33&title_li=' ); ?>

    This assumes that 33 is the page ID of the main page of your category, but of course you have to use whatever the real page ID of that page is.

    In the latest version of WordPress it's a bit tricky to find out the page ID of a given page. The way I do it is open the page in Firefox and hover with the mouth over 'Edit this entry'. If you do this, you can see the page ID in the status bar at the bottom of your browser window.

    HTH

    Frank

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.