![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
(felis madjewicus)
Industry Role:
Join Date: Jul 2006
Location: In Mom & Dad's Basement
Posts: 20,368
|
wordpress: different menus for different categories?
can you do different menu content for different categories pages on the blog?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: May 2004
Location: 4 8 15 16 23 42
Posts: 4,444
|
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 ?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Sep 2004
Location: PA, USA
Posts: 5,283
|
Outside LOOP...
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 } ?> 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: 312744199 |
![]() |
![]() ![]() ![]() ![]() ![]() |