Support

Home Forums Event Espresso Premium Unable to Edit Event Details Template

Unable to Edit Event Details Template

Posted: January 25, 2016 at 5:12 pm


institutleadership

January 25, 2016 at 5:12 pm

Hello, I would like to edit the default template for event view details (e.g. http://www.domain/events/my-beautiful-event/

I tried to follow the instructions from https://gist.github.com/lorenzocaum/16aac08f099d7c154f04 but i am not able to see the changes. I would like to have something similar to https://www.bmatcrashcourse.com/events/london-26-august-2016/. That means to have a column on the left and the details on the left etc.

My current event page doesn’t even show the event title.

Current Ugly Event Details Page

Please help


Tony

  • Support Staff

January 26, 2016 at 2:37 am

Hi there,

Event Espresso uses your sites theme to output the event details, it does this in a very similar way in which a standard single post would be output, using your single.php template file (or index.php if you don’t have one) and just injects the event details into the_content()

In WordPress the templates for single posts check for a single-{post_type}.php template file, if one is not available they will use the generic single.php template. What this means is that you can specify exactly how the single espresso_events posts will be pout using a single-espresso_events.php template file which is what the instructions from https://gist.github.com/lorenzocaum/16aac08f099d7c154f04 try to guide your through.

(Note the above is theme dependent as some themes don’t use any templates and output evenything through index.php by default, you can still take over this using single-{post_type}.php templates but your theme may also have other ways to handle this)

However one problem is that the output needs to be specific for your theme, the template files mentioned in the link above are built from twentyfourteen so they may not be compatible with your theme and won’t look how you expect. If no event title is being output then either a template file is missing or its being hidden by CSS as the templates do output the title.

Can you link me to one of your events please, I’d like to take a look at what is happening.

The link you provided as an example has all of the standard EE output, what is it you would like to change?


institutleadership

January 26, 2016 at 5:38 am

The link is another website I found which is using your plugin which appeals to my eyes and would like to inspire for my website. My website is the one in the image and you can see the Event Details Page it’s not very appealing . I would like to change the CSS and positioning of different elements:

  • The title in the link its under a blue background as a “header” in the event details template.
  • The ticket selections font bigger.

The development website is currently running on a local virtual machine so it’s not accessible from the outside world. I will try to make it available this afternoon and let you know.

I also put a string to test to see if the theme is using the single-espresso_events.php, but the string did not get displayed on the event details page that you see in the picture in my previous post. It seems to me the plugin or theme is still not using that new file i put in my theme folder as in the instructions from https://gist.github.com/lorenzocaum/16aac08f099d7c154f04

If there are any other troubleshooting steps (involving the theme issue etc) please let me know and i will troubleshoot and repost back to you.


Tony

  • Support Staff

January 26, 2016 at 6:12 am

The title in the link its under a blue background as a “header” in the event details template.

The title needs to be added by your theme, you can then style it however you prefer using css but right now it seems it isn’t added at all.

The ticket selections font bigger.

You can likely do that just with some css.

Without actually seeing the code or viewing the pages to see what is happening its hard to narrow this down but so far the only change that requires a template file is to add the title_title() which for EE events would output the event title.

IMO the template files from https://gist.github.com/lorenzocaum/16aac08f099d7c154f04 complicate matters, they are useful if you want complete control over each individual section of EE, but not if you just want the sidebar left or sidebar right etc. I would recommend removing them so you can work with what your theme outputs by default and then modify from there based on your themes templates rather than using the other templates to push content to work differently.

Try installing a plugin such as What the file and loading the single event agin, in the admin bar you’ll see a ‘What the file’ dropdown tha lists all of the template used by your theme to output the data. You can then see whats going on and what templates your theme is using.


institutleadership

January 27, 2016 at 6:54 am

here is the development event details page i want to customize the look and feel.

http://dev.institutleadership.ca/en/events/la-prise-de-decision-journee-unique-de-formation/


institutleadership

January 27, 2016 at 7:02 am

I have installed What the file as you mentioned earlier and it shows : page-fullwidth.php for the event details page. Please tell me how can I customize the look & feel for the Event Details Page. I am sure i am not the only one asking for this… As you can see i don’t see the title of the Event..


Tony

  • Support Staff

January 27, 2016 at 9:00 am

Have you manually set a template within the event editor? Like this – http://take.ms/IOT1n

Please tell me how can I customize the look & feel for the Event Details Page. I am sure i am not the only one asking for this… As you can see i don’t see the title of the Event..

The problem is I can’t as each theme is different. It is your theme that is not outputting the event title, not Event Espresso. Likely because the template in use is a page template and it does not include the_title() for pages.

Which theme are you using?


institutleadership

January 27, 2016 at 9:25 am

The theme is “Financial Advisor Responsive WordPress Theme” – theme1763 (as named in WordPress -> Themes


Tony

  • Support Staff

January 27, 2016 at 11:54 am

Have you manually set a page template within the event editor? Like this – http://take.ms/IOT1n

Can you send a copy of the theme to support[at]eventespresso.com so I can take a look at what is happening?


institutleadership

January 27, 2016 at 2:13 pm

Yes we have the template set as full width page.
Yes it is a page template.
I am sending you the theme we are using.


institutleadership

January 27, 2016 at 2:19 pm

I have sent the theme. You should have it now.


institutleadership

January 28, 2016 at 5:27 am

I think i managed to get the Event Details Page template using the theme.. The problem was the Fullwidth Page template.. and also in the header of single-event_espresso i didn’t have the comment Template Name: xxxx which didn’t make the template name visible in the Template dropdown in the event edit page.

Thanks a lot for your support.


Tony

  • Support Staff

January 28, 2016 at 5:31 am

Ok so I installed the theme locally and the reason your event page does not display an event title is because you are using the page-fullwidth.php template for the event which does not output the_title() at all.

This is also the reason that single-espresso_events.php from above did not work. When you set a custom template on the event within the editor, WordPress considers that choice a higher priority than the theme template files, so it users that selection to output the post.

So the problem is due to the theme and you will need to create custom templates from your theme. Start by selecting the default template within the event editor once again.

Then you’ll need to create a child theme: https://premium.wpmudev.org/blog/how-to-create-wordpress-child-theme/

Copy the single.php template from from the parent and place that copy within the child theme. Then edit the filename to single-espresso_events.php so now your theme will use that template to output the Event Espresso events.

In your child themes functions.php file place:

add_filter( 'FHEE__EED_Event_Single__template_include__allow_custom_selected_template', '__return_true' );

To tell EE to continue to inject the event details into the page even when using a custom template.

Now you can edit the single-espresso_events.php template to remove the sidebar from the output and also for the page to be full width.

So again the problem is all down to how your theme works, which unfortunately we can not provide support for. If you are unsure of the above you’ll need to contact the theme author (or a WordPress theme developer) and have them set this up correctly for you.


Tony

  • Support Staff

January 28, 2016 at 5:33 am

The problem was the Fullwidth Page template.. and also in the header of single-event_espresso i didn’t have the comment Template Name: xxxx which didn’t make the template name visible in the Template dropdown in the event edit page.

I’m glad you’ve got it working, adding the Template Name: xxxx isn’t necessary as WordPress will use the single-{post_type}.php if you do not have a template set within the event editor, so you just set it to default.


institutleadership

January 28, 2016 at 5:49 am

Good to know, excellent support service Tony, thanks again for your time!


Tony

  • Support Staff

January 28, 2016 at 6:46 am

You’re most welcome, have a great day 🙂

The support post ‘Unable to Edit Event Details 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