Posted: December 14, 2017 at 8:51 pm
|
Hi EE. I was hoping I could get some recent code to add the Event End Date/Time to the Table View template for the most recent version of EE4. I have searched the forum extensively and tried all the code I’ve found from past posts, but everything I’ve tried either doesn’t work or the code does not match due to it being for an earlier version. Thank you! |
Hi there, If you let me know exactly how you want the date to be output I’ll provide some up to date instructions. For example, do you want both the event start and event end date/times? Or replace the start with the end? |
|
|
Hi Tony. Essentially I’m just looking to add the Event End Date after the Start Date in the Date column on your Table View. It is for this page for reference: https://abamedicine.com/aesthetic-medicine-training-schedule/ So Date field would show: January 17, 2018 9:00 am – January 19, 2018 5:00 pm I realize there would maybe have to be a hypen added. Also, if there is any easy way to remove the Time from this column, and just show dates ( so January 17, 2018 January 19, 2018) I would be interested in seeing if we could make that happen too. Thank you very much for any help, I really appreciate it! |
Ok, so you’ll need to copy the existing template from within: /wp-content/eea-events-table-view-template/templates/ Your using the Open up that custom template and on line 124 you’ll find:
Change that to:
That outputs a date range with no times, like this – http://take.ms/NunhR If your event only has a single datetime, or the datetimes in the event are on the same date it will only output the single date. Is that what you are looking for? |
|
|
Tony thanks for this. I have a quick question though: why exactly would I move that template file to the root directory? Does it automatically get used instead of when it’s residing in the ‘templates’ directory once move to root? Thanks just trying to get a clear picture of what’s going on. |
Its to allow you to modify templates in a ‘safe’ location rather than hacking up core files and then losing the customizations when the plugin updates. If you edit a plugins files and then update the plugin, WordPress actually deletes the entire plugin directory then downloads the new version and extracts it in its place. So your not really ‘updating’ an exisitng plugin but replacing an older plugin with the new one meaning any files you’ve edited will be replaced. (We don’t support modifying core files and build in multiple ways for you to edit the content you may needed to) EE checks your theme’s root directory for a lot of the templates it uses (but not all) for any file with the same filename and will use that in place of the default. The reason we recommend you use a child theme is the same as above, up you place the template in a purchased theme’s directory, then update the theme, the same thing happens as with plugins. But if you have a child theme the child theme is NOT updated when the parent is, so the templates can safely sit there regardless of the parent theme. If you don’t have a child theme then you can follow this guide to create one: https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/ |
|
The support post ‘Add Event End Date/Time to Table View’ 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.