Support

Home Forums Event Espresso Premium Editing Event List Template

Editing Event List Template

Posted: July 21, 2020 at 2:52 pm

Viewing 1 reply thread


KGM_Adm

July 21, 2020 at 2:52 pm

Hi I have a page where I call [ESPRESSO_EVENTS].

I’d like to know what the best way to edit the content and formatting of this list of events is (I know there is some options in settings but I’m looking for more customization and want to know what the best method is). For example one edit I want to make is to remove the heading ‘Upcoming events’ and change the view details button to take the user to the event page.

Also would like to edit specific event pages, would I need to edit my single post php file for that?

Thanks!


Tony

  • Support Staff

July 21, 2020 at 4:32 pm

Hi there,

For example one edit I want to make is to remove the heading ‘Upcoming events’ and change the view details button to take the user to the event page.

Whilst I’m sure you have other customizations you want to make, the above can be done without modifying templates using a snippet like this:

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

However, to answer your question, you can copy the templates loaded for various sections into your theme’s root directory (preferably a Child Theme) and edit them there. EE will use those template in place of the defaults when needed.

[ESPRESSO_EVENTS] calls \event-espresso-core-reg\public\Espresso_Arabica_2014\loop-espresso_events.php which from there calls content-espresso_events-shortcode.php in the same directory. It depends on the specific changes you want to make how deep you’ll need to go within the templates.

(Take note of the comments at the top of those files as they are important)

Also would like to edit specific event pages, would I need to edit my single post php file for that?

Copy your theme’s single.php or page.php (or whatever template you prefer) and name the copy to be single-espresso_events.php now you can use that to make changes specifically for EE events. However, EE automatically injects the event details into the_content but when you use the above file it assumes you are taking over full control of the event details and stops injecting those details. You can add this:

add_filter( 'FHEE__EED_Event_Single__template_include__allow_custom_selected_template', '__return_true' );

To your theme’s functions.php file to tell EE to continue to inject them for you.

We have some details on this here: https://gist.github.com/lorenzocaum/16aac08f099d7c154f04

Viewing 1 reply thread

The support post ‘Editing Event List Template’ 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