Page 1 of 1

Conditionals and navigation

PostPosted: June 25th, 2011, 3:37 pm
by cassel
I got so far as being able to do conditionals in hiding content in leafs (i am using Headway Theme). Today, i added a forum (Mingle Forum) which is on its own page. The challenge i am facing is that the FORUM appears in the navigation for everyone, while i would like it to appear ONLY for allowed members (in this case, Level#1 with "forum" as ccap). Isn't that possible? unless i am having a brain freeze?

And while on the subject, i found that the FORUM, although it is visible in the navigation, is not accessible and therefore, the page it redirects the viewer is the page i set up saying "oops you need to register". However, if it is not possible to hide from navigation conditionally, is there a way to redirect viewers to a different page if the requirements are more than just registration? It just seems odd to say "you need to register to access this page" and then, if they register, say "oh, sorry , you have to purchase package X to access". And then, if a member IS registered, and gets to a page saying "you need to register", it will be quite confusing.

Re: Conditionals and navigation

PostPosted: June 25th, 2011, 11:09 pm
by Cristián Lávaque
You can customize the Membership Options Page based on what the person tried to view. Check the documentation for this page's variables. WP Admin -> s2Member -> API / Scripting -> Membership Options Page Variables

Would that help?

About hiding things from navigation, it's been discussed here recently viewtopic.php?f=4&t=6269

You could try hiding it from the navigation with a plugin like Exclude Pages https://wordpress.org/extend/plugins/exclude-pages/ and then add it with a conditional following Bob's example here viewtopic.php?f=4&t=10273&p=21606#p21606

I hope that helps.

Re: Conditionals and navigation

PostPosted: June 25th, 2011, 11:27 pm
by cassel
Thanks. I'll look into that.

Re: Conditionals and navigation

PostPosted: June 26th, 2011, 12:36 pm
by cassel
Starting to work on this (well, i am at it since a few hours). To "help", the Exclude Pages from Navigation is NOT working as it should on the live site (it works on the test site, as if that is where i needed it. go figure!).
Then, the other information about editing the function.php... i have to check the documentation on the Headway theme because there are some files that should be left untouched and the addition put somewhere else, so i am checking on whether that file can be edited without touching the theme.

I'll update you.

Re: Conditionals and navigation

PostPosted: June 26th, 2011, 3:07 pm
by cassel
After more research, i realised that the Exclude Pages does not work with the current version of my theme, but i can do it with the newer version of WP in the Appearance > Menus. Now, for the conditional of excluding pages, your suggested thread is probably just what i need, and i posted in that thread too, especially since i would need a little more information to be able to apply it. See you in the other thread.

Re: Conditionals and navigation

PostPosted: June 26th, 2011, 7:30 pm
by Cristián Lávaque
Replied there. :)