latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

registration form on member pg if logged out

Home Forums Community Forum registration form on member pg if logged out

This topic contains 1 reply, has 2 voices. Last updated by  Cristián Lávaque 4 years, 7 months ago.

Topic Author Topic
Posted: Monday Jun 11th, 2012 at 6:54 pm #16166

Is there a way to display content that is only visible when you are or aren’t logged in…

For instance, the membership page shows the profile edit form (via the shortcode) if you are logged in, but otherwise shows nothing. I’d like to have the page show some text and a registration form if the user is not logged in, and different text with the profile form if you are logged in.

Are there any conditionals available for writing page templates to accomplish this? …if so, what would the template call be for the profile form?

Let me know. Thanks!
-Steph M

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Jun 12th, 2012 at 7:42 am #16234

Hi Steph.

You can use the shortcode conditionals for that. [hilite path]Dashboard -› s2Member® -› API / Scripting -› Simple/Shortcode Conditionals[/hilite]

[[s2If is_user_logged_in()]
    Content for anyone that is logged in, regardless of their Membership Level.
[/s2If]]

[[s2If !is_user_logged_in()]
    Some public content. They're NOT logged in.
        A leading !exclamation means false.
[/s2If]]

I hope that helps. :)

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.