Custom "Sold Out" message on list view

Home Forums Ticket Products Event Tickets Plus Custom "Sold Out" message on list view

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1336249
    Ryan
    Participant

    Hello,

    We would like to include a custom message after the “Sold Out” message that appears on the LIST view. I have successfully added a custom message on the individual EVENT page, but cannot figure out how to do this for the LIST view.

    Basically, when a event is sold out, we’d like to have a message appear that would provide some instructions to be added to the waiting list. We don’t need any waiting list functionality, just the ability to add a custom message.

    Thanks for the help!

    #1337450
    Jennifer
    Keymaster

    Hi Mary,

    Thanks for reaching out!

    I’d be happy to help you out with this. We have some instructions on changing text around your site by adding some code to your functions.php file, or another option would be to use a plugin like Say What to replace “Sold out” with your custom message.

    Please let me know how that works and if you have any questions!

    Thanks,

    Jennifer

    #1339261
    Ryan
    Participant

    Hi Jennifer,

    Thanks for the reply, but I don’t think this solution will work for what I need. I probably should have provided a better explanation in my last post.

    Actually, I would like to keep the “Sold Out” message, but after that text, I would like to include a note (1-2 sentences) that explains how someone can contact us to be added to a waiting list. I’ve included a screenshot below for reference.

    To do this, I’m thinking we’ll need some kind of conditional statement that detects if the event is sold out, and then if so, display our custom message after the sold out text.

    Hope this explanation helps. Thanks again!

    #1342395
    Jennifer
    Keymaster

    Hi Mary,

    Thanks for the clarification, and sorry about the delayed response here!

    We are limited in the amount of support we can provide for customizations like this (please see our forum guidelines for more information), but I did write up a snippet for you that will let you display a custom sold out message. You can add the following to the functions.php file of your child theme:

    function tribe_custom_soldout_message( $html, $event_id ) {

    if( tribe_events_has_tickets( $event_id ) && tribe_events_has_soldout( $event_id ) && ! tribe_events_has_unlimited_stock_tickets( $event_id ) ) {
    $html['button'] = '

    Custom message here

    ';
    }

    return $html;

    }
    add_filter( 'tribe_tickets_buy_button', 'tribe_custom_soldout_message' );

    You can use the CSS class to add some styling to the message. I hope that helps, and please let me know if you have any questions!

    Thanks,

    Jennifer

    #1342657
    Ryan
    Participant

    This solution worked perfectly. Thank you for your help!

    #1342782
    Jennifer
    Keymaster

    I’m glad it’s working for you Mary!

    I’ll go ahead and close out this thread, but please feel free to open up a new one if you have any further questions!

    Thanks,

    Jennifer

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Custom "Sold Out" message on list view’ is closed to new replies.