Posted: February 5, 2016 at 7:10 pm
Hi, What’s the best way to do these things? Thanks, |
|
Hi Amanda, The EE Upcoming events widget is a standard WP Widget so you can clone the original into a Site Specific Plugin to create your own copy, rename the widget to something custom and alter the output to suit. Here is an example when I previously did just that: https://gist.github.com/Pebblo/d0d5f485ae0599e56e20 So then within that custom widget you can alter the output all you need and continue to update Event Espresso without a problem. |
|
thanks, I’ll try that. |
|
As far as I can tell, the html tags are stripped out well before the widget–when the event listing is saved. Do you know where that code is? If I can’t find a way to get basic formatting into the event excerpt (<p>, <br>) EE will not be much use for me. |
|
Are you manually adding a excerpt to the event or having Event Espresso create an excerpt automatically for you within the widget? |
|
Hi Amanda, One way you can get basic formatting into the event excerpt right now is use a plugin like Advanced Custom Fields. If you’ve used ACF before, you’ll know that it makes it fairly easy to add your own custom fields to WP posts and pages. It also allows for adding custom fields to Events. So for example you can create a text box editor field and call it
Once you have your custom field set up, you open up the custom widget plugin that Tony recommended in an editor, and change this line of code to use your custom field:
you change it to use Advanced Custom Field’s function instead:
Then part 2, where you want to remove the times from display. One way to do that is you set the $time variables to have an empty string like this:
Or another way, if you’re not using a custom widget template, you can use these filters to pass an empty string in a little function:
|
|
@Tony–I’m manually adding an excerpt to the event.
|
|
Advanced Custom Fields works, and I can just put the dates without the times in that field also, so it’s a viable solution. Thanks, |
|
The support post ‘Changing event list formatting in EE widget’ 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.