Navigation issues

  1. I'm trying to add a link in the Navigation that shows all posts in all categories except category 5.
    I also want a link to all posts ONLY in category 5.

    I think i can figure it out, but i cant figure out what file to edit to edit the navigation.

  2. If you're a Hybrid club member you can read all about changing the navigation here: http://themehybrid.com/themes/hybrid/navigation

    Create Pages

    However, I think you're first problem is creating the pages that contain those posts. You'll need to add a page to WordPress called "Category 5" (or preferably what cat 5 is named).

    Then you'll either need to either create a custom page template that queries all posts except cat 5. More info → http://codex.wordpress.org/The_Loop

    For the page that contains only cat 5 you can simply get that by visiting the categories page (which you can find by editing the categories in the backend).

    Customize Navigation

    You'll need to create a custom function and add it to functions.php. Something like this:

    add_filter( 'wp_page_menu_args', 'custom_page_nav' );
    
    function custom_page_nav( $menu ) {
    
    	/* New links. */
    	$links = '<li><a href="http://themehybrid.com" title="Example 1">Example 1</a></li>';
    	$links .= '<li><a href="http://themehybrid.com" title="Example 2">Example 2</a></li>';
    	$links .= '<li><a href="http://themehybrid.com" title="Example 3">Example 3</a></li>';
    
    	$menu = str_replace( '</ul></div>', $links . '</ul></div>', $menu );
    
    	return $menu;
    }

    That code adds three new links to your navigation. Just substitute those with te pages you'd like to use.

  3. Wow.
    I guess ill go back to Joomla.

    Thank you Patrick.
    -Josh

  4. Haha, don't be scared!

    Actually, if you can hold off until April, WordPress 3.0 will have a built-in menu manager. If you can't wait till then, there's already menu manager plugins.


Reply

You must log in to post.

Topic Info

  • 4 posts
  • Started 5 months ago by gautch
  • Latest reply from Patrick Daly
  • This topic is not a support question

Tags

Tags: