PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Hide menu item unless logged in

s2Member Plugin. A Membership plugin for WordPress®.

Hide menu item unless logged in

Postby mattar12 » June 21st, 2011, 2:41 pm

is there a way to hide a specific menu item unless the user is logged in? Right now the link still shows, but it takes them to the membership options page. I'd rather the link just not show.
User avatar
mattar12
Registered User
Registered User
 
Posts: 1
Joined: March 23, 2011

Re: Hide menu item unless logged in

Postby diannemclean » June 21st, 2011, 4:41 pm

I would like this feature as well - is it possible to add to the development updates?
User avatar
diannemclean
Registered User
Registered User
 
Posts: 14
Joined: March 22, 2011

Re: Hide menu item unless logged in

Postby Cristián Lávaque » June 22nd, 2011, 12:38 am

This is in the development to-do list. In the meantime, you will need to the edit the template for that menu and edit it so it doesn't show items the current user doesn't have access to. WP Admin -> s2Member -> API / Scripting -> Using Advanced Conditionals or Advanced Query Conditionals
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010

Re: Hide menu item unless logged in

Postby candy » June 30th, 2011, 3:52 pm

hmm ... I just happen to need this too, but I do not understand what do you mean now with the "menu template" !??!

I have no such "menu template", just using the Wordpress 3.1.3 menu options, how can it be still done ?!?

Thanks!
User avatar
candy
Registered User
Registered User
 
Posts: 102
Joined: November 16, 2010

Re: Hide menu item unless logged in

Postby BobTabor » June 30th, 2011, 6:07 pm

Please check out this thread (especially the solution near the bottom):

viewtopic.php?f=4&t=10273

It explains how to programmatically show or hide a menu item based on Membership Level (1 through 4) but could be modified to only check whether a user is authenticated or not. Hope this helps!
User avatar
BobTabor
Experienced User
Experienced User
 
Posts: 84
Joined: April 28, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 2 guests

cron