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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-11-2008, 02:34 PM   #1
Angry Jew Cat - Banned for Life
(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?
Angry Jew Cat - Banned for Life is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-11-2008, 03:04 PM   #2
StarkReality
Confirmed User
 
StarkReality's Avatar
 
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 ?
StarkReality is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-13-2008, 11:04 PM   #3
bangman
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
 }
 ?>
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

// 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 } ?>
Let me know if you need some help.
__________________
- David Hall
ICQ: 312744199
bangman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.