PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Content Dripping workdays only

s2Member Plugin. A Membership plugin for WordPress®.

Content Dripping workdays only

Postby jonnytr » June 4th, 2010, 7:11 am

Hi,

I would like to know how to do content dripping from monday to friday only ?
And is it possible to hide and show pages like content dripping I mean page 1 is showing for the fist month then on month 2 the page 1 is hidding and page 2 is showing ?

Thanks and regards,
Jonathan
User avatar
jonnytr
Registered User
Registered User
 
Posts: 1
Joined: June 4, 2010

Re: Content Dripping workdays only

Postby Jason Caldwell » June 23rd, 2010, 5:50 pm

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 } ?>
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests

cron