Here is an example of Content Dripping, based on day of the week.
- Code: Select all
<?php if(date("l") === "Monday"){ ?>
show content for Monday.
<?php } else if(date("l") === "Tuesday"){ ?>
show content for Tuesday.
<?php } else if(date("l") === "Wednesday"){ ?>
show content for Wednesday.
<?php } else if(date("l") === "Thursday"){ ?>
show content for Thursday.
<?php } else if(date("l") === "Friday"){ ?>
show content for Friday.
<?php } else if(date("l") === "Saturday"){ ?>
show content for Saturday.
<?php } else if(date("l") === "Sunday"){ ?>
show content for Sunday.
<?php } ?>
Combining this technique, along with conditional checks on the registration date of a Member.
- Code: Select all
<?php if(S2MEMBER_CURRENT_USER_IS_LOGGED_IN_AS_MEMBER){ ?>
This is some content that will be displayed to all Members.
<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 30){ ?>
Drip content to Members who are more than 30 days old.
<?php if(date("l") === "Monday"){ ?>
show content for Monday.
<?php } else if(date("l") === "Tuesday"){ ?>
show content for Tuesday.
<?php } else if(date("l") === "Wednesday"){ ?>
show content for Wednesday.
<?php } else if(date("l") === "Thursday"){ ?>
show content for Thursday.
<?php } else if(date("l") === "Friday"){ ?>
show content for Friday.
<?php } else if(date("l") === "Saturday"){ ?>
show content for Saturday.
<?php } else if(date("l") === "Sunday"){ ?>
show content for Sunday.
<?php } ?>
<?php } ?>
<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 60){ ?>
Drip content to Members who are more than 60 days old.
<?php } ?>
<?php if(S2MEMBER_CURRENT_USER_REGISTRATION_DAYS >= 90){ ?>
Drip content to Members who are more than 90 days old.
<?php } ?>
<?php } ?>