Home › Forums › Calendar Products › Community Events › Clean up Venues and Organizers post objects
- This topic has 3 replies, 2 voices, and was last updated 5 years, 10 months ago by code-engine-studio.
-
AuthorPosts
-
May 28, 2018 at 12:30 am #1539926code-engine-studioParticipant
Hi,
I want visitors to enter new Venue and Organizer info from scratch every time they submit a new event. This also means that long term there will be a ton of redundant Venues and Organizers post objects with no real value because we don’t plan to reuse them.
I see 2 possible solutions for this:
1. Not using Venues and Organizers as post objects. If they are just taxonomies (for example) that attached to an event, when I bulk clean up events they will be gone too. Is there any easy way not to use Venues and Organizers as custom post types?
2. Use a bulk clean up tool for Venues and Organizers, similar to one for Events. Is this tool available with the plugin? If so where can I find it?
If you know of a better solution please let me know as well.
Thank you!
May 28, 2018 at 8:02 pm #1540398CliffMemberIt’s not possible to use Venues or Organizers as anything other than the custom post types that they are.
You could use https://theeventscalendar.com/extensions/hide-others-organizers-and-venues-in-community-events/ — or fork it if needed — to limit what people see in the Community Events form options. If you choose to implement such custom code, do consider the differences between adding a new event vs editing an existing/upcoming event.
We do not have a bulk cleanup tool for Venues or Organizers, but you could use these recently-added options within The Events Calendar’s settings:
- Move to trash events older than ___
- Permanently delete events older than ___
You could then come up with a snippet tying into wp_trash_post() and/or wp_delete_post() and detect if the deleted post was an Event, then also delete its attached Venue and Organizer.
Of course, we always recommend restorable database and file backups as well as performing modifications first on a staging site before modifying anything on your live/production site.
May 29, 2018 at 3:48 am #1540576code-engine-studioParticipantI will pass this on to my developers. Will get back to you for more questions.
Thank you!
May 29, 2018 at 7:01 pm #1541410CliffMemberThanks for the update.
Please note that threads get Closed automatically after a couple weeks of inactivity. If it does get Closed, please open a new thread, adding your current problem description and also linking back to this thread.
Thank you!
June 20, 2018 at 9:35 am #1557298Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Clean up Venues and Organizers post objects’ is closed to new replies.