Support » Plugin: Events Manager - Calendar, Bookings, Tickets, and more! » is_future test doesn’t seem to be working.

  • Resolved Tyler Tork

    (@tylertork)


    My event page definition includes the following:

    {has_event_location_url}
    Attend online: #_EVENTLOCATION
    {is_past}
    Event has ended.
    {/is_past}
    {is_current}
    (happening now!)
    {/is_current}
    {is_future}
    (not started yet)
    {/is_future}
    {/has_event_location_url}

    For online events, the “Attend online” line does show up. However, none of the following three strings is displayed. All my events at the moment are in the future so I’d expect to see “(not started yet)” but in any case, I’ve covered the three possibilities so ONE of the three strings should show!

    • This topic was modified 3 years, 6 months ago by Tyler Tork.
    • This topic was modified 3 years, 6 months ago by Tyler Tork.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    It seems like you’re stacking your custom conditional placeholders. Currently by default it won’t work by adding another condition inside a condition. If you want those to happen, You can try adding this on your theme.

    define('EM_CONDITIONAL_RECURSIONS',2); or define('EM_CONDITIONAL_RECURSIONS',3); depending how depth your nested placehodlers are.

    Thread Starter Tyler Tork

    (@tylertork)

    Since it doesn’t seem to be possible to write an expression with logical operators — e.g. {has_event_location_url & is_past} — I wonder how you expect people to manage simple formatting like this example, without editing their theme files. It seems like a lot of effort for users of your plugin to get something to work that people just naturally expect to work.

    If it’s this easy to add this ability to your plugin, why don’t you just do it by default? Is it somehow super wasteful to have conditional recursion enabled and not use it?

    At the least, your documentation might mention this PROMINENTLY.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘is_future test doesn’t seem to be working.’ is closed to new replies.