• Resolved suzyleusby

    (@suzyleusby)


    Is it possible to have the event removed automatically from the events list once it is full? Ie when all the places for an event are gone

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can use a conditional placeholder:
    https://wp-events-plugin.com/documentation/conditional-placeholders/

    {has_spaces}content{/has_spaces}
    Will only show events with tickets and not sold out.

    Thread Starter suzyleusby

    (@suzyleusby)

    Thank you ever so much, that worked perfectly!

    Just wondered if there are no events available with spaces can I display some alternative text?

    No, no events = no data. ??

    Hi,

    There is a turnaround using Jquery.
    You wrap spaces field with an ID.

    {has_spaces}<div id=”spacesID”>content</div>{/has_spaces}

    Then you can add Jquery:

    //Replace spacesID with your ID
    var spaces = $(‘#spacesID’);
    //Lets see if spacesID exist on the page DOM
    if (spaces.length < 1) (function(){
    //If does not exist
    spaces.html(‘There are no more spaces for this event’);
    }
    // If exists, do nothing and let EM set the number of spaces available
    else {}
    );

    Not pretty, but doable.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘remove event from list once full’ is closed to new replies.