Home › Forums › Calendar Products › Community Events › Event Submitted Template Community Events
- This topic has 5 replies, 2 voices, and was last updated 10 years, 9 months ago by
Nico.
-
AuthorPosts
-
May 28, 2015 at 11:45 pm #965942
Joel
ParticipantIt’s taken me about a year to get back to this topic that I posted a year ago: https://theeventscalendar.com/support/forums/topic/where-is-event-submitted-template/
After a lot of recent thought, the launch of a new site using these plugins, and trying to rethink the way I’m using the templates for both the Events Calendar Pro and The Community Events plugins I’m befuddled.
I feel that using the “events template” setting in The Events Calendar’s Basic Template Settings as the template for the pages displayed when a user submits and edits any previously submitted Community Event posts is a huge oversight when it comes to customizing your plugin.
For instance, because I’m using hero images and other full page with features I do not add a containing div in the template that I use at the settings mentioned above. Every view is very customized, so the template I use for that basic setting is very naked.
So, if I was to use Casey’s first suggestion from a year ago (change the custom page template I’m using) it would affect every template that I’ve customized. In the second suggestion, by using the community redirect plugin for newly submitted events (which should be a native function to the plugin, in my opinion) I solve only part of my problem because the plugin does not redirect users that edit an already published event.
I have found one common containing div in on the “event submitted page” which is the div with an id of “tribe-community-events” but customizing the CSS of this div is not a comprehensive solution.
Sorry, for the long forum post but it seems everything I wrote was necessary. Did I overlook a simple solution?
May 29, 2015 at 12:44 pm #966119Nico
MemberHi operapreneur,
Nice to see you around again 🙂
I think I know what you are trying to achieve, but please correct me if I got it wrong.
Have you tried creating a specific page-template just for Events? I understand that using the same template you use for pages may not be a fit. But having a customized page-template just for Events might work for this case. Let me outline the steps for this:
1- First go ahead an create a new page-template for Events.
If you are not sure how to do so, you can check out the Page Templates section of the WordPress Theme Handbook.2- Go to Events Settings > Display > Events Template and select the new page template for Events.
Don’t forget to save changes.3- Test it!
Hope that helps! Please let me know if I miss-understood the situation,
Thanks,
NicoMay 30, 2015 at 9:47 am #966224Joel
ParticipantHi Nico,
Sorry, perhaps I wasn’t clear in my explanation. I’ve already done that. I created a customized page template and already made the changes at the settings that you and I mentioned.
I’ve done a great deal of customization to most of the views in the free and pro version of The Events Calendar and the page template that I created is very bare on purpose. If I make any changes to that template then I’d have to re-structure everything.
I understand that when a user submits a new event using the Community Events Add-on or they edit a previously published event via the Community Events Add-on they are directed to the template we mentioned and is set at Settings > Display > Events Template. My situation is, in my opinion, this is a problem with the Community Event Add-on because it is extremely limiting when it comes to theming and providing a customized user experience.
Why, instead of just using the template at Settings > Display > Events Template, doesn’t the Community Events Add-on have it’s own Views Template for anything submitted or edited like submitted-event.php or something similar. Is this the role of the file default-placeholder.php in the add-ons views folder (the-events-calendar-community-events/views/community/default-placeholder.php)?
June 1, 2015 at 8:02 pm #966524Nico
MemberHi operapreneur,
Thanks for your detailed feedback on this, now I do understand what you meant in first place. I’ll take a look at this tomorrow first thing in the morning and I’ll let you know if I find a way to achieve a better customization of the community events submitted/edited screens.
Looking forward to solving this,
nicoJune 2, 2015 at 1:01 pm #966686Nico
MemberHi operapreneur,
Thanks for waiting on me! As you say there’s no ‘submitted-event.php’ template, and sorry to say ‘default-placeholder.php’ is a wrapper for community templates.
I think the best approach is to use redirects, for created and updated events. To achieve this you can add this lines to ‘functions.php’ file in your theme.
function ce_redirect_event_created ( $event_id ) {
wp_safe_redirect( home_url() ); // Edit home_url() to whatever you page want
exit();
}
add_action( 'tribe_community_event_created', 'ce_redirect_event_created', 10, 1 );function ce_redirect_event_updated ( $event_id ) {
wp_safe_redirect( home_url() ); // Edit home_url() to whatever you page want
exit();
}
add_action( 'tribe_community_event_updated', 'ce_redirect_event_updated', 10, 1 );
Bear in mind that $event_id is being passed to the function, so if instead of doing the redirect you prefer to show event information you can call tribe_events_get_event with $event_id as a parameter to retrieve the event.
Let me know if this works for you,
Thanks
NicoPS: if you want to propose as feature having a separate template for ‘submitted-events’, that would be great. You are welcome to do so at our UserVoice page. 🙂
June 24, 2015 at 7:39 am #972579Nico
MemberHey operapreneur,
Since there hasn’t been any activity on this thread for over 2 weeks I’m now closing it. Feel free to start a new thread if you have further issues.
Best,
Nico -
AuthorPosts
- The topic ‘Event Submitted Template Community Events’ is closed to new replies.
