Whilst trying to protect content I also wanted content to become available after a set period eg 1 year - so that older material becomes available for everyone, say. Content dripping does it the other way as I understand it - eg shuts it down after a set period.
Is there a way for a post to become available after a certain amount of time
Content dripping can work either way. See http://s2member.com/kb-article/s2drip-shortcode/
You’ll need Pro.
The limitation with dripping is that it works in relation to the length of membership of each specific user. So if you want content available from a specific date to everyone, dripping isn’t the answer.
Instead, I’d suggest trying the Show/Hide Content at Set Time plugin: https://wordpress.org/support/plugin/shortcodes-to-show-or-hide-content
I have Pro. Nope these won’t work. I guess I could create a new category every so often and then delete this from the restrictions?
What do you mean by “these don’t work”? What have you tried exactly?
I have used the Show/Hide Content at Set Time plugin without difficulty in conjunction with s2Member, so I’m curious why it didn’t work for you.
OK I have had a closer look - I thought it was a lot about turning content off.
But thanks for making me take another look. So, example. I create content 1 January 2016 protected up to Level 3. I want to allow everyone to read it 1 January 2017 onwards. In the past I might create a post using the s2member admin drop down widget for the level restriction - simple - but this doesn’t open the content after 1 year. However, much of the time I am using shortcodes/php in the content in order to offer up some content to non members and gain their interest for conversion. So, let’s say this currently looks like this:
<?php if (current_user_can("access_s2member_level3")){ ?>Protected content here
<?php } else if (current_user_is("s2member_level0")){ ?>Blurb and …/continued…you need to subscribe to be able to view content
<?php } else { ?>Some other content and a link to a subscription.
Now how would one use that plugin to get at the protected content after 1 year? I would suggest as follows - is this what you mean?
[time-restrict off=“January 1, 2016”]<?php if (current_user_can("access_s2member_level3")){ ?>
<?php } else if (current_user_is("s2member_level0")){ ?>
Protected content hereBlurb and …/continued…you need to subscribe to be able to view content
<?php } else { ?>Some other content and a link to a subscription.[/time-restrict]
[time-restrict on=“2017-01-01”]My protected content. [/time-restrict]
So, it’s getting complicated… I’ve got to add in a new message about subscribing…
Is it just you and me on this Forum?
Is it just you and me on this Forum?
Quite possibly! (It gives me a break from my “proper” projects!)
It is getting complicated – but what you want to do is complicated. I don’t really see a way around that unless you can just protect the page as a whole at a certain level and leave the MOP to handle those who can’t access it. Then you’d just need the shortcodes for making the post more generally available from a certain date.
I would suggest that you use the ezPHP plugin to run your PHP code (you probably already are) but then using the shortcodes it enables instead of regular PHP tags.
So <?php
becomes [php]
and ?>
becomes [/php]
. The reason is that you can then move between visual and html tabs without corrupting your code. And, since we both agree it’s complicated already, I’d hate to hear you have to keep re-typing it.