• Resolved laikmosh

    (@laikmosh)


    hello akira, i posted in another thread about this, you told me to create a new one

    Hi laikmosh,

    Yes, it’s possible to use before and after parameters with custom fields, in place of value and compare. If you need more details, please start another support post and I can help you there.

    So what i need to do is to show different messages depending on how much time left to a date set in a custom field

    something like:
    if 30 to 25 days left then “something”
    if 24 to 10 days left then “something else”

    is this possible with the before and after parameters, or with value and compare?

    https://wordpress.org/plugins/custom-content-shortcode/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    I made another plugin update, to see if this is possible. You can try something like this:

    [if field="date_field" after="10 days" before="24 days"]
      10~24 days left
    [/if]
    [if field="date_field" after="25 days" before="30 days"]
      25~30 days left
    [/if]

    This is assuming that the date field is in the future.

    Please let me know how it works for you. It might depend on how the date field value is stored – so if it doesn’t work, you can tell me the output of the field itself.

    Thread Starter laikmosh

    (@laikmosh)

    akira… i just love you!
    thanks for everything!
    ill let you know how it works, as far as i know the field output is YYYYMMDD

    Thread Starter laikmosh

    (@laikmosh)

    yep, it worked fine, thanks again

    Plugin Author Eliot Akira

    (@miyarakira)

    Great, thanks for letting me know. It’s nice when it works in the first try. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘before and after parameters with custom field’ is closed to new replies.