Jump to content
Sign in to follow this  
claudiomaria

Sub categories horizontal menu

Recommended Posts

claudiomaria

Hello, we would like to have our subcategories displayed - exactly as it happens with child-page - in an horizontal sub-menu row. Is it possible? Thanks!

Share this post


Link to post
Share on other sites
catrina

Hello, Would you like this sub-menu row to appear directly below the primary navigation bar on all pages?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
claudiomaria

Yes, we would like to have the very same functions of the child-pages submenu.

Share this post


Link to post
Share on other sites
cmunns

Hey Claudio, This is a great point, we'll look into making the subnav work with sub-cats

Share this post


Link to post
Share on other sites
heroescourse

Any updates on this one? Thanks!

Share this post


Link to post
Share on other sites
systime

I am having the same problem? Do you have a solution?

Share this post


Link to post
Share on other sites
cmunns

I tried to basically replace the current subnav function listed below so that each occurence of wp_list_pages is now wp_list_categories and it seems to work: `

  • <?php if(count($post->ancestors)>=2){ $reverse_ancestors = array_reverse($post->ancestors); $children = wp_list_categories("title_li=&depth=1&child_of=".$reverse_ancestors[0]."&echo=0&sort_column=menu_order"); }elseif($post->post_parent){ $children = wp_list_pages("title_li=&depth=1&child_of=".$post->post_parent."&echo=0&sort_column=menu_order"); }else{ $children = wp_list_categories("title_li=&depth=1&child_of=".$post->ID."&echo=0&sort_column=menu_order");} if ($children) { echo $children;} ?>
`

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×