HOW TO SHOW/HIDE A CONTENT TEXT BASED ON MEMBERSHIP EXPIRATION DATE
-
Good morning lovely peeps of paidmembershipspro.com I need help with how I can show a content when the membership is still active and when it’s expired!
Me myself this code below is what have tried
function msgfrpro() { global $current_user; $current_user->membership_level = pmpro_getMembershipLevelForUser($current_user->name); $date = date('d/m/Y'); $theday = do_shortcode('[pmpro_expiration_date]'); $plan = $current_user->membership_level->name; if(((($date < $theday) || ($date == $theday) || ($theday > $date)|| ($date > $theday )))) { $out = '<p style="text-align:justify;">show content for active members that have not expired! </p>'; } if(($theday == '') || ($theday == '---')) { $out = '<p style="text-align: justify;">show content for user with expired membership or user with no membership </p>'; } return $out; } add_shortcode('msgfrpro', 'msgfrpro');
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘HOW TO SHOW/HIDE A CONTENT TEXT BASED ON MEMBERSHIP EXPIRATION DATE’ is closed to new replies.