In event expresso is there away to archive events other than trash? Some events we like to keep in past events so don’t want to trash them. Also a lot of events we will reuse in the future so good if we can somehow file away from the current ones.
I want to hide expire event from the front end but i am using custom query instead of default shortcode can you please help me to exclude expired event if using custom query
Also i am getting all the attribute using $post_object = get_post( $post_id ); ao i want to get expired attribute using $post_object
Event Espresso does not have an “archive” feature for events in the way you describe, and there isn’t an “expired” attribute attached to the $post_object.
What you can do instead is do a JOIN on the esp_datetime table to get the datetimes of the event. Event Espresso 4 core does something similar when it does the query for the native WP custom post type archive for events.
Here’s a link to the source that shows how EE4 core filters out expired events:
You can review the methods there for:
posts_fields
posts_join
posts_where
Viewing 2 reply threads
The support post ‘Archive events other than trash’ 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.
Support forum for Event Espresso 3 and Event Espresso 4.