• How can I accomplish this:

    IF [Monday] show text “DAY ONE” and image1 and image2
    IF [Tuesday] show text “DAY TWO” and image2 and image3
    IF [Friday] show text “DAY FIVE” and image1 and image2 and image 3

    Found this code, but I dunno how to change it so it work properly

    <?php switch(date('N')) {
    case 1: ?>
    <div class="monday"> mo<!--whatever--> </div>
    <?php break;
    case 2: ?>
    <div class="tueday"> tu<!--whatever--> </div>
    <?php break;
    case 3: ?>
    <div class="wednesday"> we<!--whatever--> </div>
    default:
    } ?>

    Thank you very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • That code is correct and will work. What exactly are you having a problem with?

    If it’s just the content to show, then you can modify everything that’s in the <div class="*day*">*content*</div> areas.

    If you’re looking for changing the days, have a read through the PHP manual for date() and it will tell you what you need. 1 is Monday, 2 is Tuesday, 5 is Friday, etc. You just need to change the value for the case: and you’ll display the correct information.

    I will write you a plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘IF certain day (Sunday, Monday, etc) show certain IMAGE’ is closed to new replies.