Posted: May 19, 2022 at 2:28 pm
The template is displaying Event information twice once at the very top and then again below the Event title. The other issue is the event list is displaying expired events even though we have the option to hide expired events turned on |
|
Hi Chris, Are you using Avada layout templates? In short, Event Espresso hooks into We have a snippet you can use to hook into Avada and prevent that from happening: You can add that to a custom functions plugin on your site, we have some documentation on creating one here: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ With that on the site does it work as expected then? |
|
Yes, We are using Avada. Will this fix the issue about hiding expired events? |
|
Thanks for the help. I was able to put that code into the function.php of the Avada Child Theme. The Remain issue is the It is showing the most recent event details where the header should be and even though I have the option turned on it is showing expired events. |
|
Hi Chris! Thanks for getting back to us. In order to take a look at your website, could you please share your temporary WordPress credentials following this link? I am waiting for your comment on this! |
|
Hi there, It looks like your are using the Avada Templates feature on both the Single output and the Archives (I’m guessing you are using it sitewide). I’ve included some code in my gist above so that it should not also remove the even output from archives: https://gist.github.com/Pebblo/bb0c36c05392a3b91ea1c635fcaa794d Try replacing the code you currently have with the above, does that fix the /events/ output? |
|
After playing around with both codes you provided I found that Lines 3-15 of the code in the link below: https://gist.github.com/Pebblo/bb0c36c05392a3b91ea1c635fcaa794d fixes the header issue on both the: https://bcpoa.com/events/bcpoa-summer-social-2022/ It also removes the ticket selector on individual events page. I can add the ticket selector as a shortcode but by doing that it causes the calendar tooltip to break the Avada layout. I turned the tooltip off for now. If I add lines 17-29 it adds the ticket selector and event details multiple times at the top of the page. I don’t currently have 17-29 in the child theme. The remaining issue is Expired Events When I added the code https://gist.github.com/Pebblo/bb0c36c05392a3b91ea1c635fcaa794d it did not do anything. Under the Events > Templates Tab I have the setting Show Expired Events – “No” yet expired events are still visible on https://bcpoa.com/events/ I will add login credentials in a private message. |
|
This reply has been marked as private. | |
Sure, it will do because that’s what those lines do. Lines 17-29 re-add the call to add the event details into the content, so without those EE won’t automatically inject the event details back in. To explain a little, EE hooks into the call to They have a hook within the function so they can add exceptions for things like the above and to allow plugins to hook into that process and remove functions, before the_content call, then re-add them afterwards again, which is what my function does.
Is that on the single event output?
That’s the same function for removing/re-adding the functions mentioned above? Did you mean to add another function? |
|
This is in regards to an individual event page |
|
Actually, I could do with some conditional’s in that code as it will be adding the filters twice. Try the above code in full, but remove lines 24-28. What happens then? |
|
When I have the full code in Use Custom Display Order – No https://paste.pics/fc21db40a4ab5cc1d62adf687d85fe65 Use Custom Display Order – Yes |
|
removing lines 24-28 fixed the issue |
|
The support post ‘Template issues’ 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.