Posted: February 20, 2020 at 7:20 pm
|
I’d like to add customization so my staff can see columns for date & times of the events I schedule them for. I’d like to update the posts for People add-on so that it is only showing “Upcoming” events and also their date and start time. How can I do this? |
Hi Melissa, May I ask which specific output you are looking to change above? Can you can add either a link or a screenshot: https://eventespresso.com/wiki/troubleshooting-checklist/#screenshots I just want to confirm we are on the same page before sending you down the wrong path. |
|
|
Like on this: https://theinstantartist.com/people/kailynandrews/ Right now, the page shows events that have passed. I’d like to only have upcoming events on there. And I would like it to show date and start time next to the event’s name. |
|
(adding reply to add the ‘Notify via email checkbox’) |
Ok, so to modify that section you’ll need to copy the template used by the people add-on into the root directory of your theme (preferably a child theme). The template you need is By default the people add-on will output a list of events for each ‘type’ a person is assigned to, if you only need a full list of events they are assigned to you can use something like this: https://gist.github.com/Pebblo/316da15cc653109fd94d3960fffe777f On line 26 you have an EE_Event object you can use to pull any of the additional details you need. |
|
|
That took care of making the list only upcoming events. But what do I need to have in there to add the date and time? |
Will output the date and time for primary datetime on the event you passed the ID for using the date and time format set on the site. Place that in the loop wherever you can the date and time to be output. For example right after this Add |
|
|
I must be doing something wrong because I cannot get the date and time to show up. This is what I have in the child theme folder
|
My apologies, my mistake. This: Needs to be: |
|
|
That did it, thanks so much! |
|
Is there any way to make it in order of date? Right now there doesn’t seem to be any order |
Sure, I’ve updated my gist to order by the Event start dates in ascending order: |
|
The support post ‘People Addon Customization’ 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.