Members only area message and sign up form on all blog posts and main blog page for non-members.

Hello Friend,

I have installed S2Member on my WordPress website. I have configured it to the best of my ability.

I have gotten S2Member to restrict my blog and blog posts to only people that have become a member

I have S2Member installed and working. But it’s missing a crucial feature.

This is what I want…

If a person comes to one of my blog posts or the main blog page before they become a member I want the blog post they want to read (and main blog page) to have a message that says something like;

“Members only area. Become a member now to view the content. Becoming a member is free. Sign up now.”

Underneath the Members only content message I want to have this sign up form: that was created with S2Member: https://tylercarty.com/wp-login.php?action=register

If this is not possible I could place the member only message and member signup form at the top of the sidebar widget.

Is there any documentation on how to do this? Or can someone please advise me? I will try to return the favor for you, when you decide to help me.

-TylerCarty

Hi! You can achieve the result you mention by using conditionals.

So, you can make the page itself public, then use conditionals for the content, instead…

Below I pasted the item of the help that’s built in the plugin for your reference (you can see it by going to “S2Member” (on the left menu while you’re logged as admin), then API/Scripting, then you can check Simple/Shortcode Conditionals…

Example #4: Specific content for each different Member Level.

[s2If current_user_is(s2member_level4)]
    Some premium content for Level 4 Members.
[/s2If]

[s2If current_user_is(s2member_level3)]
    Some premium content for Level 3 Members.
[/s2If]

[s2If current_user_is(s2member_level2)]
    Some premium content for Level 2 Members.
[/s2If]

[s2If current_user_is(s2member_level1)]
    Some premium content for Level 1 Members.
[/s2If]

[s2If current_user_is(s2member_level0)]
    Some content for Free Subscribers.
[/s2If]

[s2If !current_user_can(access_s2member_level0)]
    Some public content.

I hope this helps.

:slightly_smiling_face: