Page 1 of 1
Show menu items if logged in, hide if logged out...
Posted:
October 31st, 2011, 3:51 pm
by kvaughn
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.
Re: Show menu items if logged in, hide if logged out...
Posted:
October 31st, 2011, 3:57 pm
by Eduan
Are both sites the same site? or is one is "some-site.com" and the other "some-other-site.com"?
Re: Show menu items if logged in, hide if logged out...
Posted:
October 31st, 2011, 4:03 pm
by kvaughn
Hi Eduan, they are different sites on different domains. Thanks.
Re: Show menu items if logged in, hide if logged out...
Posted:
October 31st, 2011, 4:11 pm
by Eduan
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.
Re: Show menu items if logged in, hide if logged out...
Posted:
October 31st, 2011, 4:42 pm
by kvaughn
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.
Re: Show menu items if logged in, hide if logged out...
Posted:
October 31st, 2011, 4:47 pm
by Eduan
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?
Re: Show menu items if logged in, hide if logged out...
Posted:
October 31st, 2011, 5:12 pm
by kvaughn
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.
Re: Show menu items if logged in, hide if logged out...
Posted:
October 31st, 2011, 5:17 pm
by Eduan
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.
Re: Show menu items if logged in, hide if logged out...
Posted:
October 31st, 2011, 5:33 pm
by kvaughn
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.
Re: Show menu items if logged in, hide if logged out...
Posted:
October 31st, 2011, 6:09 pm
by kvaughn
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.
Re: Show menu items if logged in, hide if logged out...
Posted:
October 31st, 2011, 6:30 pm
by Eduan
Okay, glad you figured it out.