Support

Home Forums Event Espresso Premium Upcoming Event Widget – customization

Upcoming Event Widget – customization

Posted: December 16, 2012 at 7:35 pm

Viewing 4 reply threads


gwinnettehc

December 16, 2012 at 7:35 pm

I’m trying to customize my Upcoming Events widget, more than using shortcodes.

The biggest thing I am trying to accomplish is to have the dates not linked or the same color as the title of the event. I also want to add a “View Calendar” button/link beneath the list of events.

Are there some php snippets I can use to call the upcoming events and set the number of events that it displays?

Thanks!


Dean

December 17, 2012 at 4:33 am

Hello,

It would involve editing the widget.php file found in event-espresso/templates but which can be copied to uploads/espresso/templates

Around line 145 after it says /* After widget (defined by themes). */ add

?>
 <a href="#" rel="nofollow">View Calendar</a>
<?php

this will add a basic link to the calendar page, obviously change # to the link.

The date:

Line 129 says

<

p>< a href="“>event_name) ?> – start_date) ?>

This needs to be edited. Either by adding tags around the date php so that you can target it with CSS and overrule or by completely re writing that code to a different structure of your choosing.


gwinnettehc

December 17, 2012 at 8:58 am

Thank you so much! Is it safe to say that if there are any updates to the plugin, that this process will have to be duplicated? Just wanted to make sure.

Thanks!


Josh

  • Support Staff

December 17, 2012 at 2:19 pm

Hi Gabriele,

If you copy the widget.php to /wp-content/uploads/espresso/templates, your changes will not get overwritten on the update. Please note: If you customize and change the template code from the defaults we’ve created and tested, it becomes your job to maintain it. What this means is if we update widget.php in a future update, you’ll need to keep those changes in sync with your custom version of widget.php.


gwinnettehc

December 18, 2012 at 8:46 am

Thanks Josh!

Viewing 4 reply threads

The support post ‘Upcoming Event Widget – customization’ 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