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™

Show menu items if logged in, hide if logged out...

s2Member Plugin. A Membership plugin for WordPress®.

Show menu items if logged in, hide if logged out...

Postby kvaughn » October 31st, 2011, 3:51 pm

I have two sites both running the current version of s2Member Pro. On one of the sites, when I am logged in, menu items that link to s2Member protected pages appear in the menu and when I log out they are hidden; only showing menu items that are linked to unprotected pages. On the other site the menu is completely static, it doesn't matter whether you are logged in or not, all menu items show at all times regardless of whether or not the item links to a protected page.

I don't remember doing anything special to the first site to make this happen. Can anyone tell me if this is a setting somewhere in s2Member? Or...?

Any assistance would be appreciated.
User avatar
kvaughn
Registered User
Registered User
 
Posts: 31
Joined: August 26, 2011

Re: Show menu items if logged in, hide if logged out...

Postby Eduan » October 31st, 2011, 3:57 pm

Are both sites the same site? or is one is "some-site.com" and the other "some-other-site.com"?
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Show menu items if logged in, hide if logged out...

Postby kvaughn » October 31st, 2011, 4:03 pm

Hi Eduan, they are different sites on different domains. Thanks.
User avatar
kvaughn
Registered User
Registered User
 
Posts: 31
Joined: August 26, 2011

Re: Show menu items if logged in, hide if logged out...

Postby Eduan » October 31st, 2011, 4:11 pm

Okay, first check if you logged out successfully, if not do so and see if it works like you want.

If that doesn't work then check if the first website, the one that blocks things correctly, has any code that might be related to what's under WP Admin -> s2Member -> API / Scripting.

If not then try using the corresponding code (most probably the one under Simple/Shortcode Conditionals) on the part that has to do with the menu.

Please tell me if this helps. ;)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Show menu items if logged in, hide if logged out...

Postby kvaughn » October 31st, 2011, 4:42 pm

Yes, I believe the site is loggin out correctly.

There has been no custom API / Scripting of any kind.

As far as I know there is no way to place Short codes on menu items. I am using a slightly modified version of the twentyten theme and menus are built in the admin interface.

The site that is not functioning as desired is rrnmf.com.
User avatar
kvaughn
Registered User
Registered User
 
Posts: 31
Joined: August 26, 2011

Re: Show menu items if logged in, hide if logged out...

Postby Eduan » October 31st, 2011, 4:47 pm

Please go to WP Admin -> s2Member -> Restriction Options -> Alternative View Protection and configure the things there and tell me if that helps.

P.S. What is supposed to be blocked?
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Show menu items if logged in, hide if logged out...

Postby kvaughn » October 31st, 2011, 5:12 pm

Regarding Alternative View Protection: both sites have "Filter ALL WordPress® queries; protecting all Alternative Views." checked (all checkboxes checked).

On the functioning site, if a page is s2Member protected (level1, 2, 3, etc), the corresponding menu item linking to that protected page, appears or is visible if the user is logged in. The menu item disappears when the user loggs out. This is the desired functionality.

On the new site, the entire menu shows at all times.
User avatar
kvaughn
Registered User
Registered User
 
Posts: 31
Joined: August 26, 2011

Re: Show menu items if logged in, hide if logged out...

Postby Eduan » October 31st, 2011, 5:17 pm

Okay, but what is protected from what you can see so that I can identify the problem. Please just tell me one link that should be protected.
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Show menu items if logged in, hide if logged out...

Postby kvaughn » October 31st, 2011, 5:33 pm

The pages are being protected. It is the menu items shat should not be showing up.

Go to: http://www.rrnmf.com/

The "Member Directory" and "Private Messages" menu items should not be there until the user loggs in.
User avatar
kvaughn
Registered User
Registered User
 
Posts: 31
Joined: August 26, 2011

Re: Show menu items if logged in, hide if logged out...

Postby kvaughn » October 31st, 2011, 6:09 pm

Figured it out...

Using the tewntyten theme, if you build the menu with "Custom" menu items instead of "Page" items, the items will not hide when logged out (WP Admin -> Appearance -> Menu -> then select and drag "Page" items). I rebuilt the menu using "Page" items and all is working correctly now.

Thanks for your help Eduan.
User avatar
kvaughn
Registered User
Registered User
 
Posts: 31
Joined: August 26, 2011

Re: Show menu items if logged in, hide if logged out...

Postby Eduan » October 31st, 2011, 6:30 pm

Okay, glad you figured it out. :)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.


Return to s2Member Plugin

Who is online

Users browsing this forum: Yahoo [Bot] and 0 guests

cron