Support » Plugin: Events Manager » [Plugin: Events Manager] Combining conditional placeholders

  • Resolved snatrott

    (@snatrott)


    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:

    {has_bookings}
    {logged_in}
    #_BOOKINGBUTTON
    {/logged_in}
    {not_logged_in}
    <a href="#_EVENTURL" title="#_EVENTNAME" class="button">Register now</a>
    {/not_logged_in}
    {/has_bookings}

    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.

    http://wordpress.org/extend/plugins/events-manager/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Marcus

    (@netweblogic)

    will have a look and fix if so

    Any luck with this one?

    I have a similar problem with multiple conditions.

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

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

    Plugin Author Marcus

    (@netweblogic)

    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.

    Thanks, that solved my problem.

    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/

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Events Manager] Combining conditional placeholders’ is closed to new replies.