Support

Home Forums Event Espresso Premium EE4 Widget template override?

EE4 Widget template override?

Posted: March 10, 2014 at 7:12 pm

Viewing 8 reply threads


Jed Dela Cruz

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.


Dean

March 11, 2014 at 4:01 am

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.


Jed Dela Cruz

March 11, 2014 at 4:34 am

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.


Dean

March 11, 2014 at 6:00 am

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?


Jed Dela Cruz

March 11, 2014 at 6:05 am

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.


Sidney Harrell

March 11, 2014 at 10:36 am

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.


Jed Dela Cruz

March 11, 2014 at 5:23 pm

Thanks Sidney! I’ll give it a shot.


Josh

  • Support Staff

March 14, 2014 at 3:50 pm

Please let us know how it works out.


Jed Dela Cruz

March 14, 2014 at 6:19 pm

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.

Viewing 8 reply threads

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.

Event Espresso