[wp-hackers] Top level current page navigation

Dan Gayle dangayle at gmail.com
Mon Dec 1 20:13:25 GMT 2008


I started with wp_list_categories() with exlusions, but it soon became  
unwieldy.

Because there are hundreds of categories, and about 10 top level  
categories that I don't want in the navigation. Custom coding any  
exclusions from wp_list_categories() every time they change things  
without my notice isn't a fun option. It's complicated :(

I'll investigate the current-cat-parent stuff further though. Perhaps  
I missed something.


On Dec 1, 2008, at 11:28 AM, Otto wrote:

> Why are you not using wp_list_categories() to produce the list? It
> adds current-cat and current-cat-parent to categories, for the
> is_category cats, and supports a current_category input parameter for
> your own use if you want individual posts to trigger the current-cat
> class as well.
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list