StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-29-2010, 10:47 PM
wpsmith's Avatar
wpsmith wpsmith is offline
Registered User
GenesisConnect
Pro Plus Member
 
Join Date: May 2010
Location: Atlanta, GA
Posts: 486
Default Different Custom Menus

Does anyone know of a way to use custom menus in 3.0 to show one menu for logged in users and another menu for non-logged in users? I have the two menus (menu1:logged-in-menu and menu2:logged-out-menu) created in 3.0 and their ids (id 15 and 16). However, I am not really sure where to add the code.

I am sure it uses something like this, but I am not sure how to start with functions.php
PHP Code:
<?php
if ( is_user_logged_in() ) {
     
wp_nav_menu( array( 'theme_location' => 'logged-in-menu' ) );
} else {
     
wp_nav_menu( array( 'theme_location' => 'logged-out-menu' ) );
}
?>
Do I use a remove_action(); and add_action(); or do I use a filter? I am using Genesis though.

Any suggestions?

Last edited by wpsmith; 11-29-2010 at 11:10 PM. Reason: more info
 

Tags
custom menus

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get custom menus? julieo General Discussion 3 11-26-2010 12:12 AM


All times are GMT -5. The time now is 11:39 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.