Events Manager
[resolved] Combining conditional placeholders (7 posts)

  1. snatrott
    Posted 4 years ago #

    I want to display the booking button for logged in users and a link to the event page for users that are not logged in. I put the following code into my Default event list format area:

    <a href="#_EVENTURL" title="#_EVENTNAME" class="button">Register now</a>

    The proper buttons display if I remove the has_bookings placeholders, but the Register Now button shows up on every event and not just the ones with bookings enabled.


  2. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    will have a look and fix if so

  3. snatrott
    Posted 4 years ago #

    Any luck with this one?

  4. banton
    Posted 4 years ago #

    I have a similar problem with multiple conditions.

    {has_image}Show the image as #_EVENTIMAGEURL{/has_image}
    {no_image}Show a default image{/no_image}

    The images work just fine without the {is_future} -condition.

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 years ago #

    actually, yes, there is a fix for this, you have to manually this record to your wp_options table:

    option_name = dbem_conditional_recursions
    option_value = 1 or more

    you could do this e.g. with the adminer plugin

    change the number to the number of levels, in bantons case, it'd be 2.

    this is because most people don't nest conditionals, and this requires extra processing for each level of nesting.

  6. banton
    Posted 4 years ago #

    Thanks, that solved my problem.

  7. blackriver
    Posted 3 years ago #

    Thanks for the solution. Maybe this should be a part of the General Options page, or at least, it has to be mentioned on the user guide page: http://wp-events-plugin.com/documentation/conditional-placeholders/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic