Support

Home Forums Event Espresso Premium Alter Event Title Location

Alter Event Title Location

Posted: May 20, 2015 at 7:33 pm

Viewing 2 reply threads


WDesignGroup

May 20, 2015 at 7:33 pm

Good evening folks, I have implemented the EE Widget on my home page (EE4) so that I may show the next upcoming event only. The widget places the Event Title above the Event Image/Thumbnail, however I want the title placed beneath the image. By editing widgets/upcoming_events/EEW_Upcoming_Events.widget.php I can get this to work, but these changes would get overwritten next time EE gets updated. Is there a way to edit this without it getting overwritten?

Alternatively I have tried the EE4 shortcode [ESPRESSO_EVENTS limit=“1”] to show the next upcoming event which places the event title beneath the image like I want, however the date of the event does not show up which is odd.

Any suggestions? I would offer to post the URL however I am working locally on MAMP.

Thank you!


Dean

May 21, 2015 at 4:03 am

Hi,

The only way I can see this working would be to copy the widget Class from /wp-content/plugins/event-espresso-core-reg/widgets/upcoming_events/EEW_Upcoming_Events.widget.php to a site specific plugin.

Rename the Class so it doesn’t conflict (I’d recommend renaming the ee-upcoming-events-widget in the __contruct method too).

Then below the class add

add_action( 'widgets_init', function(){
     register_widget( 'EEW_Upcoming_Events2' );
});

Where EEW_Upcoming_Events2 is the name of the new Class.

This will generate a new widget and you can edit the HTML structure as needed.

It has the added benefit of not being over written on update.

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


WDesignGroup

May 21, 2015 at 6:58 pm

Thank you Dean, this worked!!

Viewing 2 reply threads

The support post ‘Alter Event Title Location’ 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