Hopefully this will get you started on the right track…
Add this to your Theme’s functions.php file:
//Make sure this goes between the php opening and closing tags.
add_shortcode('dw-content-drip-menu','dw_content_drip');
function dw_content_drip(){
$menu = '<ul class="content_drip_menu">';
if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 0){
$menu .= '<li><a href="">Course 1</a></li>';
}
if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 7){
$menu .= '<li><a href="">Course 2</a></li>';
}
if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 14){
$menu .= '<li><a href="">Course 3</a></li>';
}
if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= 21){
$menu .= '<li><a href="">Course 4</a></li>';
}
//Add courses as needed like above
$menu .= '</ul>';
return $menu;
}
add_shortcode('dw-content-drip-check','dw_content_drip_check');
function dw_content_drip_check($atts,$content){
extract(shortcode_atts(array("days" => 0),$atts));
if(S2MEMBER_CURRENT_USER_PAID_REGISTRATION_DAYS >= $days){
return do_shortcode($content);
}
}
Use this shortcode in your page or sidebar text widget to show the list of links (content dripped):
[dw-content-drip-menu /]
Use this tag around your course content, using the “days” attribute to make sure it is only shown to those who have paid for that long:
[dw-content-drip-check days="21"]
Put your content here...
[/dw-content-drip-check]
Hope that helps,
Dave