Posted: June 1, 2022 at 3:00 pm
|
I’m using this shortcode: What am I doing wrong here? Thank you! |
Hi Shelly, May I ask which events you expect not to be visible on that page, please? I suspect what EE defines as expired is different from what you are expecting here. For example I’m assuming you are expecting this event: https://hoffmanarts.org/events/summer-poetry-kickstart/ To be removed because the ticket has expired? If so, it’s not what EE considers an expired event as it has Datetimes on the event that are upcoming. Apologies if I’m way off the mark here but if so if you can add some more details I’ll check into those events and confirm 🙂 |
|
|
You are totally correct…. they want to be able to hide it because you can no longer buy tickets. Is there some other way to achieve this?Thank you so much,S |
Hi there! Thanks for getting back to us. Thanks, |
|
|
We are using this shortcode: [ESPRESSO_EVENTS category_slug=class order_by=start_date,id button_text=’More Info’ show_expired=false] On this page: https://hoffmanarts.org/classes/all-classes/ The Moon Journal is now Sold out and still showing and the Summer Poetry no longer has tickets on sale (but there are class dates that are yet to happen). Ideally neither of these should be showing… I’ve added the following to our functions.php: function tw_ee_tweak_event_list_exclude_sold_out_events_where( $SQL, WP_Query $wp_query ) { $SQL .= “AND {$wpdb->prefix}posts.post_status != ‘sold_out’ “; // removes sold events from displaying in the Upcoming Events widget add_filter( |
Hi there! Thanks for getting back to me. Actually, I think I know what is happening here. For Event Espresso, the expired means “the end date to sell tickets is reached”; the expired event is not when the tickets are sold out, for this reason, you are still viewing the “expired” tickets. With the above code, is it worked as expected? |
|
|
Is it at all possible to hide events once there are no tickets left? OR is there a way to have a banner or notice that says “Sold Out” on the event list? |
There is a snippet to exclude events that have only expired tickets available here: However, can you add a screenshot of the Datetime & Tickets section for the Moon Journal event? As far as I can tell that should be switching status to Sold out and be removed by the other snippet. |
|
|
Yes you can see it here; https://hoffmanarts.org/events/moon_journal_series_1-with-melissa-young/ |
Can you edit that event and post a screenshot of the ‘Event Tickets & Datetimes’ section, please? https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots From what I can see on the front end, that event should have switched to Sold Out, but it hasn’t, just the ticket has. |
|
|
whoops. sorry: https://ibb.co/478K9KN |
Hmm, something isn’t adding up here. Are you sure thats the correct event you edited? (Sorry to ask, but the image just doesn’t add up) The ticket in that screenshot is Active, not sold out (it has a qty of 16 and 8 sold) The datetimes displayed in that image don’t match up with the datetime displayed on the event you linked to. So to confirm, I’m looking at this event: https://hoffmanarts.org/events/moon_journal_series_1-with-melissa-young/ And want the same section above in the screenshot, but for that event, is that what was added above? |
|
|
Ok – this is definitely it: |
Hmm, yeah that one really doesn’t make sense! That event is sold out and should be switching to sold out. Mind if I take a look in the admin to see if anything stands out on that event? |
|
The support post ‘Show Expired = False Not working in EE4’ 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.