Support » Plugin: Dynamic Conditions » Dynamic Tag Date Compare Type

  • Resolved Stefan57

    (@stefan57)


    Hi, first I have to say I love your DynaicConditions plugin for Elementor.

    But, I have a suggestion for the next update

    If I select Dynamic Tag as a Custom Field date and time that looks like: 2020/12/31 11:21:00 I would like you to add two more Compare Types like:

    Today-Date
    Today-DateTime

    This way we could set a custom field expire date, and when it passes the date or DateTime we could make a section hidden, or we can set a start date so we could make it show up.

    A fixed date as we have today will not give us this option.

    Hope you get what I mean and it can be implemented soon 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author rtowebsites

    (@rtowebsites)

    Hello @stefan57,

    if we get you right, you want to show or hide based on a date/time.

    You should already be able to do that.

    – Dynamic Tag -> Current Date Time
    – Show/Hide -> depends on you
    – Condition -> Less/Greater then (depends on you)
    – Compare Type -> String to time
    – Conditional value -> now

    Or you can use it with custom dates

    – Dynamic Tag -> ACF Date/Time field
    – Show/Hide -> depends on you
    – Condition -> Less/Greater then (depends on you)
    – Compare Type -> String to time
    – Conditional value -> today UTC

    Or any other string to time value.

    Did it solve your suggestion?

    Thanks for your quick reply!

    I have tested and cannot get it to work.

    Say I have 10 different posts in my db, all with a custom field named: coupon_expire_datetime
    And all posts have different expiration datetime.

    I select coupon_expire_datetime as Dynamic Tag.

    I select Greater Than

    And then date and that pulls up a calendar where I manually have to set a date.
    What I am looking for is to match it against Current Date or Current DateTime.

    If coupon_expire_datetime is greater than Current DateTime, then it is visible,
    and once coupon_expire_datetime becomes less that Current DateTime, it becomes hidden.

    This way I can have my 10 posts show and hide automatically after how I have set the value in the custom field: coupon_expire_datetime

    An example how the custom field value can look: “Dec 24, 2020 00:00:00” or “Nov 15, 2019 12:50:00”

    Hope I explained good enough so you can understand me 🙂

    IF this can be done today already, and I missed something, can you explain the process to me?

    Plugin Author rtowebsites

    (@rtowebsites)

    Hello @stefan57,

    we tried it and got it work.

    Steps:
    – ACF Field -> Date Picker (reveal-date)
    – Use on All posts
    – Create 2 Posts
    – Post 1 reveal-date = yesterday
    – Post 2 reveal-date = tomorrow

    – Dynamic Tag -> ACF Field (reveal-date)
    – Show/Hide -> Show when condition met
    – Condition -> Grater then
    – Compare Type -> String to time
    – Conditional value -> now

    Results (Debug):
    Post 1:
    Element:section-b0caf4e (section)
    DynamicTag-Tag:acf-text
    DynamicTag-Key:field_5dbaa3386d7f5:reveal-date
    DynamicTag-Value:1572393600
    Check-Value:1572513199
    Check-Value2:0
    Condition-Type:strtotime
    Condition:Show if greater
    Condition met:no

    Post2:
    Element:section-b0caf4e (section)
    DynamicTag-Tag:acf-text
    DynamicTag-Key:field_5dbaa3386d7f5:reveal-date
    DynamicTag-Value:1572566400
    Check-Value:1572513200
    Check-Value2:0
    Condition-Type:strtotime
    Condition:Show if greater
    Condition met:yes

    We hope that helps you.

    THANK YOU!
    It looks like that should do the trick 🙂
    Thanks again for Super Support!

    /Stefan

    Plugin Author rtowebsites

    (@rtowebsites)

    Hello @stefan57,

    you are welcome. We close the issue. Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.