Hi Cheryl,
This is an advanced modification and will require using PHP code to check the user’s registration date and compare that to the date of the post.
You’ll need to modify your theme’s single.php file and add the necessary conditional using PHP.
To retrieve the user’s registration date, you can use the s2Member S2MEMBER_CURRENT_USER_REGISTRATION_TIME PHP constant (see Dashboard -› s2Member® -› API / Scripting -› PHP/API Constants). To retrieve the post date, you’ll need to use the WordPress the_date() function.
Since the_date() returns the post date in a different format (human readable) from what S2MEMBER_CURRENT_USER_REGISTRATION_TIME is returned in (Unixtime), you’ll first need to convert the_date() to Unixtime using the PHP strtotime() function.
So, the conditional might look something like this:
<?php
if ( strtotime( the_date() ) < S2MEMBER_CURRENT_USER_REGISTRATION_TIME ) {
// show post
} else {
// show message informing user they don't have access to older posts
}
?>
If you’re not comfortable with PHP and need help implementing this advanced modification to your WordPress theme, we recommend posting a job on jobs.wordpress.net.