Widget Logic
logic to display if date is between X & Y (2 posts)

  1. zestylemon
    Posted 5 years ago #

    I'd really appreciate it if someone could tell me what widget logic I'd use to:
    * only display if date is between X & Y

    Assuming X = 01 Jan 2011 & Y = 31 Jan 2011 then widget should display from 1st to 31st January 2011.

  2. Lynda
    Posted 5 years ago #

    Well, I just got a date function to work using this:

    date("l") == 'Wednesday'

    You could change the string inside the date function and the output to grab January 2011

    It's probably possible to code between X and Y the same way you would in PHP, but I don't have that need. I searched high and low for the correct way to phrase the conditional to get a date match with widget logic and never found it, so I thought I'd share that solution here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic