Support

Home Forums Event Espresso Premium Event Template Files

Event Template Files

Posted: April 20, 2016 at 8:56 am

Viewing 17 reply threads


robbstcs

April 20, 2016 at 8:56 am

Hi,

I’ve been trying to change the way the template files look and the content in them. I have been editing …/wp-content/plugins/event-espresso-core-reg/public/Espresso_Arabica_2014/content-espresso_events.php

However everything I seem to write in this file isn’t getting recognised. Is there another template file which will allow me to redesign the layout for the events pages?

I know there is the functionaility in wp-admin backend however I need to go just a little bit further.

Thanks.


Lorenzo Orlando Caum

  • Support Staff

April 20, 2016 at 9:32 am

Hello,

That is a core plugin file so we don’t recommend editing it. Any changes would be lost upon updating.

Could you share some feedback on what you are trying to change?

Thanks


Lorenzo


robbstcs

April 26, 2016 at 2:19 am

Hello,

I’ve added it to a child theme just to change the layout of the Events. I’m wanting to move elements around and I’ve done this in WooCommerce on another website by changing the template files in a child theme. I’m hoping that Events Espresso I can make changes to the layouts of the event listing page and single event pages.


Lorenzo Orlando Caum

  • Support Staff

April 26, 2016 at 4:18 am

Hello,

There is an option on Event Espresso –> Events –> Templates to re-order the event elements.

Look for the custom display option and turn it on and then save. Then use the drag and drop option to select the order that you will like.

There is an option for the event listings page and the single event pages.


Lorenzo


robbstcs

April 26, 2016 at 4:18 am

For example, i’m wanting a custom layout on the events page where each event is displayed. Currently the page has lots of white space on the right and it would be good if I could reorganise the template and move things around in a child theme like I’ve done previously with WooCommerce which seems to use a similar process to deliver its products.

http://demostcs.co.uk/keep_active/events/


Lorenzo Orlando Caum

  • Support Staff

April 26, 2016 at 4:40 am

Hi, I’m unable to view that link. Is is restricted to residents in the UK?


Lorenzo


robbstcs

April 26, 2016 at 4:42 am

I’ve seen them options just wondering if I can go further because it only moves the ‘blocks’ of content up or down in a vertical fashion but I just need more flexability. I know an alternative is just to add custom css and widths but just thought that editing the templates for layouts would be an option.


robbstcs

April 26, 2016 at 4:43 am

sorry, we’re having issues with our hosting this morning.


Tony

  • Support Staff

April 26, 2016 at 5:24 am

Hi there,

Yes you can take full control over the output of Event Espresso.

By default EE basically just hooks into the_content and injects the details to that, which mean it uses your theme and just injects the details when viewing the espresso_events post. The options you mention above basically just move around the order in which that happens before its injected.

EE events are a custom post types (they are more of a hybrid as we also use custom tables) and as mentioned your sites theme to output the data. This means that you can style Event Espresso specifically in the same way you would standard posts, using a single-espresso_events.php (single events) and archive-espresso_events.php (event list)

You’ll want to start with a copy of single.php and archive.php from your current theme and rename them.

Then take a look within /wp-content/plugins/event-espresso-core-reg/public/ and you’ll see examples of how you can use single.php and archive.php to pull in various other template parts. You can do the same thing to pull in details the same way with your templates and take full control of the output.

It depends on the exact changes you want to make as to how ‘deep’ you need to go through the templates.


robbstcs

April 26, 2016 at 7:15 am

Thanks Tony,

That’s what I’ve been after. I can change the files in ‘Espresso_Arabica_2014’ folder in Events Espresso plugin folder / public and the content changes.

However, I have created a child theme and moved the ‘Espresso_Arabica_2014’ under it :

themes/u-desgin-child/event-espresso-core-reg/public/Espresso_Arabica_2014

I’ve also tried

themes/u-desgin-child/event-espresso-core-reg/Espresso_Arabica_2014
themes/u-desgin-child/Espresso_Arabica_2014

so that any updates on Events Espresso doesn’t delete any changes I make. But neither of these paths are working.

Thanks


Tony

  • Support Staff

April 26, 2016 at 8:26 am

Try placing the files directly within your child theme.

/themes/u-designed-child/

That applies to ‘standard templates’ like single-espresso_events.php and the EE template files.


robbstcs

April 26, 2016 at 9:15 am

That works! Thanks.

I have replaced all of the content of my themes Archive.php and placed it into the archive-espresso_events.php. It doesn’t look the same as when I remove the file out. Shouldn’t it look the same as before as it was using Archive.php?


Tony

  • Support Staff

April 26, 2016 at 10:09 am

How is it different?

Do you mean EE is not injecting the event details anymore? If so that’s expected. If you are using archive-espresso_events.php or single-espresso_events.php EE expects you to take over full control of the output and does not inject the event details into the_content any more (otherwise you would end up with it twice)

We have a filter you can use to tell EE to continue to do that if you prefer but if your using any of the EE template tags that EE injects automatically you will get duplicate content.


robbstcs

April 27, 2016 at 2:07 am

Oh okay, thanks. I’ve been looking at https://eventespresso.com/wiki/ee4-themes-templates/ . There are plenty of functions that should return the different parts of an event etc, however I’m a little unsure of how to use these in my ‘archive-espresso_events.php’.

How would you invoke: espresso_venue_gmap() for example into the template?


robbstcs

April 27, 2016 at 2:11 am

Oh sorry, nevermind I’ve managed to do it. I think thats all the help I need. I should now be able to create my own template.

Thank you for the help.


Tony

  • Support Staff

April 27, 2016 at 2:33 am

I’m glad you figured it out 🙂

If you have any further problems just let us know.


robbstcs

April 27, 2016 at 6:36 am

I’ve made my events list page (archive) and now I’ve moved on to the single event page. From the list at: https://eventespresso.com/wiki/ee4-themes-templates/ , there is no function:

1) to display the ticket options (so that people can select their tickets and submit -> to purchase)

2) to display any reviews or comments on a particular event.

How do I then retrieve those from EE. Thanks.


robbstcs

April 27, 2016 at 7:15 am

I’ve found the espresso_ticket_selector() function which works a charm for the ticket options.

Is there a similar function for reviews/comments?

Viewing 17 reply threads

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