Support

Home Forums Event Espresso Premium how to add custom setting to upcoming event widget using hooks.

how to add custom setting to upcoming event widget using hooks.

Posted: August 30, 2018 at 8:15 pm

Viewing 1 reply thread


qianglu

August 30, 2018 at 8:15 pm

I decided to customize the upcoming event widget for my client needs. For instance, I want to have a event name without linking to the event page, also and only show date without time. So I want to add two settings: activate_event_link and show_times, so I can deactivate the link and turn off the times.

I can hack and change the code directly, if you would like to accept this change in the future version of EE4. Otherwise, I would like to use hooks. Could you give me a brief guidance or clew how to do this in Event Espresso.


Tony

  • Support Staff

August 31, 2018 at 4:10 am

Hi there,

I can hack and change the code directly, if you would like to accept this change in the future version of EE4.

Whilst we welcome pull requests we take more than just a single use case into consideration when including changes into core, so a ‘hack and change’ approach may not be accepted (that may just be incorrect phrasing, but just pointing it out).

I don’t think were are any hooks that will do what you need, however, there is nothing stopping you from copying the EE Upcoming Events widget into a plugin and creating your own custom version of it, like this:

https://gist.github.com/Pebblo/d0d5f485ae0599e56e20

Add that to a custom function plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

and you’ll have an additional ‘Custom Event Espresso Upcoming Events’ widget that you can change to suit.

Will that work for you?

Viewing 1 reply thread

The support post ‘how to add custom setting to upcoming event widget using hooks.’ 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