• Hey,

    I tried show a section until a specific date. I entered the following expression

    date('Ymd') <= '20200327'

    When I now look at my page I see only half of the section and
    [/et_pb_column]
    See the screenshot

    If I enter only booleans as expression, it works without error.

    Am I doing something wrong?

    • This topic was modified 6 years, 3 months ago by axlf81.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jonathan Horowitz

    (@jhorowitz)

    Hi @axlf81!

    Sometimes the shortcode parser gets confused with certain expressions.

    Try defining a function in your theme like this:

    function today_is_before_or_on($date) {
    	return date('Ymd') <= $date;
    }

    And then call it in the Content Visibility setting: today_is_before_or_on('20200327')

    Thread Starter axlf81

    (@axlf81)

    Hm. Thank you.

    Is it possible to create functions in a plain divi theme?

    I’m not using a child theme…

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error on date expression’ is closed to new replies.