can you do different menu content for different categories pages on the blog?
wordpress: different menus for different categories?
Collapse
X
-
Tags: None
-
Should be pretty easy to code in php, but unfortunately I don't know any plugin around doing this...someone got some code for this ready ? -
Outside LOOP...
So what you could do is insert the above code above your regular menu and either include your regular menu in this if statement or do something like:Code:<?php $post = $wp_query->post; if ( in_category('2') ) { // do something if they are in category 2 } else { // show regular menu, or remove this else } ?>
Let me know if you need some help.Code:<?php // required for outside of post $post = $wp_query->post; // if the current post is in category 2 if ( in_category('2') ) { // do something if they are in category 2 } else { ?> this is my regular menu HTML.<br /> <ul> <li>Menu Item</li> <li>Menu Item</li> <li>Menu Item</li> </ul> <?php } ?>- David Hall
ICQ: 312744199Comment

Comment