Posted: April 30, 2018 at 2:48 pm
|
I only want future events for which a user is registered to display on their profile page when using the [ESPRESSO_MY_EVENTS] shortcode. I tried using the guidance from this post, https://eventespresso.com/topic/any-way-to-hide-expired-events-in-the-espresso_my_events-shortcode/, but it’s not currently working. I think it was working at one point (I’ve been doing a lot of development tweaks in recent weeks, so it’s hard to keep track), but it any event it isn’t working now. Any suggestions? Did something change with a recent update? |
Hi there, An update would not have changed this. May I ask can you clarify what you mean by “not currently working”? Does that mean that all expired events are being displayed on the user profile page, or is it only some of them? Can you post a link to one of the expired events that is being displayed so we can investigate further? |
|
|
You must login to see the courses. I’ve created a login account for you. Do you have a way for me to send you the un/pw? |
We do, but that’s probably not necessary and I think we can avoid sending credentials via forms. Are all expired events being displayed? If so are these events also flagged as sold out? If so, you will need to make a slight adjustment to the template so expired events that are also sold out are not included in the list. |
|
|
Nope – the event was not sold out. It was a one-day training with four seats “unsold” [we don’t actually sell seats – but attendance is restricted to our organization.] Following your guidance from the post in 2016 I referenced, I created a child template file for content-espresso_my_events-event_section.template.php, and added the line you offered. So it currently looks like…
… I omitted the rest of the code for brevity. |
If you make any other edits to that same template are those edits displaying when you refresh the page? |
|
|
That’s exactly what I’m trying to test right now, but I think the answer is no. I copied the original file to the themes/education-zone-child folder using cpanel, and then tried performing edits via the WP Appearance->Editor menu. But I’m not exactly sure what I should edit to look for an identifiable change. Suggestions? I also just noticed that the “Dates & Times” column is not displaying in the simple list. I currently have Title, Ticket, Location, and Action columns – but no Date/Time. |
Something like a What may be happening is you’re editing the wrong template. If the shortcode is |
|
|
Winner winner chicken dinner! That was the problem. I was using [ESPRESSO_MY_EVENTS template=simple_list_table your_events_title=’Alternate Title’] to change the header. Deleting the template=simple_list from the shortcode fixed the issue. |
The support post ‘Hiding Expired Events on User Profile Page’ 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.