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.

Restrict only members from seeing a post?

Home Forums Community Forum Restrict only members from seeing a post?

This topic contains 5 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 7 months ago.

Topic Author Topic
Posted: Tuesday May 15th, 2012 at 2:41 pm #13540
SusanJ
Username: susan

How can I restrict a post so that any logged in member will not see it? For example, I want to create a post begging the visitor to join and become a new member, but I would prefer my existing members not to have to see such a post. I have partially accomplished this in the past by creating a somewhat generic post title and using API scripting to put alternate text inside the conditionals depending on their membership.

I was hoping for something as simple as a “Public”, “Not Subscriber” or “No Level” in the “Post Level Restriction?” section. Is there some other simple way to make posts just disappear for members that I am missing?

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Wednesday May 16th, 2012 at 12:46 am #13614

Hi Susan.

You can use the Membership Options page for this, which is where people get sent by s2Member when they try to load a page they don’t have access to. A user with enough access to the content won’t be sent there. [hilite path]Dashboard -› s2Member® -› General Options -› Membership Options Page[/hilite]

The page would still be accessible to users that have paid, but they won’t be taken there. You can also customize the content of the Membership Options page based on the user’s access, using conditionals to show different things. [hilite path]Dashboard -› s2Member® -› API / Scripting -› Simple/Shortcode Conditionals[/hilite]

I hope that helps. :)

Posted: Wednesday May 16th, 2012 at 2:52 pm #13678
SusanJ
Username: susan

Thanks for the reply Cristian, but that doesn’t really answer my question. My main concern is with posts not pages. So, using the Membership Options Page won’t work. For static pages I can spend time to craft alternate text for each member level and non-members and use conditionals to make it display properly. What I would like to do is post what is essentially advertisements for becoming a member into a news feed, but I would like the paid customers to be sheltered from such posts. They still would see unprotected posts and posts specific to their member level.

By setting the “Post Level Restriction?” I can have successive member levels see more in the post stream. I would like to also be able to have them see less. I recognize that s2Member is kind of built on the idea of giving more and more to successively higher membership levels. I was thinking that removing advertising would be a benefit to a paid member.

Posted: Thursday May 17th, 2012 at 3:40 am #13734
Raam Dev
Username: Raam
Staff Member

Hi Susan,

The only way to really do this is to use the s2Member Conditionals (Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals and Dashboard -› s2Member® -› API / Scripting -› Simple/Shortcode Conditionals) to check if the person viewing the page is logged in. If they are logged in, you don’t show the page (you could redirect them somewhere else). Otherwise, you show the page.

You can also use those conditionals in your theme files to hide certain pages from the menus if necessary.

Posted: Wednesday May 23rd, 2012 at 10:48 pm #14391
SusanJ
Username: susan

Thanks for confirming that I wasn’t missing something obvious. :-) For now I’m going to use another plugin called WordPress Access Control concurrently with s2Member. It provides an “Only accessible by non-members” option which pretty much does what I need. I hope that the two plugins can play nicely together.

Posted: Thursday May 24th, 2012 at 7:33 am #14467

Cool. Let us know how that goes, please.

I added this feature to the requests list I’m keeping. Thanks for the idea! :)

Viewing 5 replies - 1 through 5 (of 5 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.