Support

Home Forums Event Espresso Premium Modifying Single Event Templates

Modifying Single Event Templates

Posted: November 25, 2014 at 1:13 pm


rcfc

November 25, 2014 at 1:13 pm

If I want to modify the details of how single event data displays, it looks like I’m supposed to modify event_content_or_excerpt(), inside of EE_Event_View.helper.php. Can you tell me what your best practice would be for doing so? I assume you fold this into functions.php somehow…?

Thanks


rcfc

November 25, 2014 at 1:16 pm

Oops oh wait, looking at that more, it actually doesn’t get that granular. What if you want to rearrange or edit the contents of the_content for your custom post single? Where would I do that?


Sidney Harrell

November 25, 2014 at 1:21 pm

You probably want to do the child-themeing process, in order to get the most flexibility.
http://youtu.be/mGw2jGZ9kr8

The child theme is included in the EE4 plugin. You’ll want to copy it to your theme folder and modify it to make it a child theme of the theme that you are using, rather than a child theme of the 2014 theme.


rcfc

November 25, 2014 at 8:15 pm

Yes, I’m already using a child of my third-party theme. Incidentally, it looks like the suggested way to make a child theme is to import all of Arabica. That’s a lot of files for one or two little mods on single posts. I believe, however, that I can be more selective in copying files over to my child theme. Even so, I’m not getting the results I want.

First of all, I’m not super clear on the EE template hierarchy. You don’t have a diagram by chance, do you? For re-ordering the display of single event data, I would expect to be editing the if(is_single()) part of content-espresso_events.php, but that doesn’t seem to be used.

Digging deeper, I’m looking in content-espresso_events-details.php, and espresso_event_content_or_excerpt(); is what outputs my single event details. Grepping around, I see this function lives in template_tags.php, and is calling the Event View helper. In view of my original post, I think I’ve come full circle here. (LOL. sigh.)

The only mod I really care about is for the “Event Details (Description)” to be displayed before the Ticket Selector. The answer I’m hoping for is that there’s a hook that I can toss in functions.php.


Tony

  • Support Staff

November 26, 2014 at 2:54 am

If you are editing content-espresso_events.php within EE’s directory (wp-content\plugins\event-espresso-core-reg\public\Espresso_Arabica_2014\) then the changes will not apply.

Those files are intended as an example of how to setup a child theme and are not actually used by EE itself as is.

However, you can move the ticket selector as you have requested using the hooks available within EE, here is an example which moves the ticket selector to load after the_content():

https://gist.github.com/joshfeck/1151c89082ccb5c0b478

Place that code within your themes functions.php file.

The support post ‘Modifying Single Event Templates’ 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