Posted: March 10, 2014 at 7:12 pm
|
Hi, I’m trying to override the widget template for upcoming events, by placing the EEW_Upcoming_Events.widget.php inside the uploads/espresso/templates folder. However, it doesn’t seem to be loading that file. Has the process of doing this changed in EE4? Thanks. |
|
Hi Jed, Yes the process has changed a lot, as now Event Espresso uses custom post types. Depending on what you are trying to do, most things can be achieved through action hooks and filters. |
|
Thanks Dean, All I’m trying to do is remove the h5 tag from the event title, in the upcoming events widget. Would you be able to suggest, or point me to a resource on how I’d go about doing that? Thanks. |
|
Well, typically, there isn’t a filter for that. Can you not just style the titles differently using CSS? Or is there another reason to remove the H5 tag? |
|
I would prefer to remove the h5 altogether for accessibility reasons to meet WCAG standards, where H tags appear in proper sequential order. If there isn’t a ‘proper’ way to do it, I guess I could always just edit the template directly and make a note to myself during every update to make the change. Thanks. |
|
What you can do in EE4 is to create a customized copy of the widget and register it using the hooks available. You can check out what I did here to add a little customization to the widget for another customer. I believe the customization there was to add an option to get the widget to show on all pages, including EE pages, which it does not by default. But the process is basically the same for the customization that you want to do. If you download the zip of the custom functions plugin here, then upload it and activate it as a plugin in your site, then it will add a new widget to the available widget list called “Custom Upcoming Events”. Then make the modifications you desire to the custom functions plugin, and they will be safe from updates. |
|
Thanks Sidney! I’ll give it a shot. |
Please let us know how it works out. |
|
|
Just tried it now, and it’s working as expected – I’m able to override the h tag for the event title. Thanks for all the help. |
The support post ‘EE4 Widget template override?’ 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.