Posted: October 30, 2017 at 6:06 pm
|
Is there a way to display events that are Sold Out? On our home page we are displaying a few events that have been tagged Featured, some are sold out, but we still want to display them, as people can wait list but this parameter is not allowing them to come through. |
Hi there, Can you let me know how you are displaying the events on your home page? I’m guessing using the [ESPRESSO_EVENTS] shortcode? |
|
|
Hello Tony I’ve actually created my own shortcode essentially because I needed different functionality and more freedom than I was finding with [ESPRESSO_EVENTS].
But I’ve also tried:
and neither seem to work. Sold Out events will not display. |
Quite likely the |
|
Ok, thank you. So those are the args your passing, but are you just simply passing those to WP_Query? If so it won’t know what show_expired is. However, show_expired isn’t for pulling in sold events as they aren’t expired, expired events are events with an event end date in the past. I’d recommend using our models to pull the events: https://github.com/eventespresso/event-espresso-core/tree/master/docs/G–Model-System Sold out events change their post status from publish, so this |
|
|
Thanks guys, I actually didn’t even consider the fact that it was changing the post status, completely overlooked it. I just created an array for the post status parameter and included ‘sold_out’ and now it’s working. Thanks! |
The support post ‘show_expired = TRUE is not showing events that are sold out.’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.