Support

Home Forums Event Espresso Premium Editing the singel event template

Editing the singel event template

Posted: November 28, 2014 at 11:09 am


Henrik Sommar

November 28, 2014 at 11:09 am

Hi,

some weeks ago I got help here to format tooltip in following Topic:
http://eventespresso.com/topic/formating-in-event-description-does-not-show-in-event-calender-tooltip/

That topic included a discussion about changing the template Single event. Josh recommended to add a template tag to make event dates visible. The problem is that I can’t find the Single event template. I have Searched the forum and documents to find the template name and the file that I have found Is content-espresso_events.php in folder wp-content/plugins/event-espresso-core-reg/public/Espresso_Arabica_2014. Doing changes in that file makes no different. Which file should I edit and where is it located in a EE4 setup?

Thanks


Lorenzo Orlando Caum

  • Support Staff

November 28, 2014 at 1:42 pm

Hi Henrik,

Starter templates are available here:

/wp-content/plugins/event-espresso-core-reg/public/Espresso_Arabica_2014

You shouldn’t edit those templates above directly as that is part of the core plugin folder which is removed and replaced during a software update.

Try downloading a copy of the templates to your computer.

Then upload them here:

/wp-content/themes/yourthemefolder

There are two files that will need to be deactivated since they are for the twenty fourteen theme:

archive-espresso_events.php
single-espresso_events.php

Change the name to this:

old-archive-espresso_events.php
old-single-espresso_events.php

Then duplicate a page.php theme template and rename to single-espresso_events.php. Now open that file for editing.

Towards the middle you should see a call for the content. That should be changed to this and save changes:

espresso_get_template_part( ‘content’, ‘espresso_events’ );

The next edit is for the archive-espresso_events.php file. Duplicate a page.php file and rename to archive-espresso_events.php. Then open the file for editing.

Change the call for content to this and save changes:

espresso_get_template_part( ‘loop’, ‘espresso_events’ );

Now you’ll have a handful of templates that can be edited and we can now look at your original question. These are how the templates work:

Event Espresso looks for single-espresso_events. This file then references content-espresso_events.php. The content-espresso_events.php file then references specific files for certain areas of the single event page such as thumbmnail, header, tickets, datetimes, details, and venues.

Try making an edit to the content-espresso_events.php file which is now in your theme’s folder and saving. Then refresh a single event page.


Lorenzo


Henrik Sommar

November 30, 2014 at 9:38 am

Hi Lorenzo,

Your answer was really helpful. Did exactly what you said and everything works perfect, well almost. I have also used the template tag that Josh recommended and installed Advanced custom fields and added some other fields that I needed. Everything works like a charm. But, I have one problem which is quite a big issue, the event description doesn’t show. Very strange. What could cause that problem? That was not a problem before I copied the templates to the theme folder. I have debugged the code down to the function call espresso_event_content_or_excerpt(); in content-espresso_events-details.php. I have putting echo before and after the function call so I know that the call is made. The function returns nothing. I need some help here. Is it a setting that makes the detail not show that I’m not aware of?

Many thanks
Henrik


Tony

  • Support Staff

December 1, 2014 at 3:15 am

Hi Henrik,

Is it a setting that makes the detail not show that I’m not aware of?

There is a setting yes, can you go to Event Espresso -> General Settings -> Templates (Tab)

Within the options there you will find the option ‘Display Description’, if that is currently set to none change it to either Excerpt or full description, save the settings and re-test.

http://take.ms/X2mu7


Henrik Sommar

December 1, 2014 at 3:25 am

Hi Tony,

That setting what I understand affects the Event List page. I have no problem on that page. The problem that I have occurs on the Single event page. Any clues?

Thanks

Henrik


Tony

  • Support Staff

December 1, 2014 at 7:12 am

There was an issue with the check for the display description setting although looking through the code it it looks like that has been fixed.

The function espresso_event_content_or_excerpt() just calls the_content() on a single page.

If you change out espresso_event_content_or_excerpt() for the_content() does it still not work? (I don’t think it will)

When you copied over the templates where you asked if you would like to replace the themes function.php file with the one from the EE Arabica directory? Is so did you you replace this?

Which theme are you using currently?


Henrik Sommar

December 1, 2014 at 8:38 am

Now espresso_event_content_or_excerpt() is replaced by the_content(). Unfortunately no change. I did copied the function.php from EE Arabica folder to the theme folder. No function.php were existing before I did the copy.

When I change theme to Twenty fourteen the description shows if that gives you any clues.

We use a child theme from a theme called Gameplan where we have made some changes in style.css.

I run version 4.4.0. I have tried to update to 4.4.5 but are not able to do so because of license key issue. We are upgrading from a EE3 version which is currently live on the domain where the license key are registered on. This new version that I work on exist on another server. I change my hostfile when I work with the new site. Don’t really know how to fix the license key issue.


Lorenzo Orlando Caum

  • Support Staff

December 1, 2014 at 12:08 pm

Hi,

We can release those support license keys. They appear to be all linked to the live site. What are the last few characters of the key(s) that should be released.

You should be able to manually update by removing Event Espresso 4 and then downloading the latest version and installing through WordPress admin –> Plugins.

Be sure to backup your WordPress before making any changes.


Lorenzo


Henrik Sommar

December 1, 2014 at 12:54 pm

Hi Lorenzo,

The last few characters is ab28892.

But do you mean that I can download and install without you releasing the license key?

Release the key anyway even if it isn’t necessary when downloading.

Many thanks
Henrik


Tony

  • Support Staff

December 1, 2014 at 1:26 pm

Hi Henrik,

I have reset all 3 of the keys that had been assigned to the same domain.

Please use a different key for each site you have Event Espresso installed on. We usually recommend to update EE manually on development servers however as you have a developer license you currently have spare keys.

You will recieve instructions via email on how to re-assign your key.

Once this is done please update EE to the latest version and re-check if this an issue.


Henrik Sommar

December 2, 2014 at 12:14 pm

Now EE is updated to version 4.4.5. i have copied all templates files again to my theme folder except from those I did a copy from page.php and renamed and edited. It is still no description showing. What on earth could be the problem here?
And why does it work when you deactivate the theme? Is it other templates involved then? I also examined the source in the browser and it is nothing there. You see the “Edit” link but thats it.

Feeling a bit hopeless

Henrik


Josh

  • Support Staff

December 2, 2014 at 1:40 pm

Hi Henrik,

Can you send a copy of your WordPress theme (the parent theme) to the support AT eventespresso.com email address so we can find out why your theme does not display the event content?


Henrik Sommar

December 2, 2014 at 2:07 pm

Hi Josh,

Your answer made me check the version of the theme and it is quite old. Should I update to latest version first and check and if it is not working then I send you the theme?

Henrik


Lorenzo Orlando Caum

  • Support Staff

December 2, 2014 at 3:21 pm

Hi,

Please re-test with a current version of the theme. If it still doesn’t work, then please email a copy to:

support [at] eventespresso.com


Lorenzo


Henrik Sommar

December 2, 2014 at 3:24 pm

I’ll do so. Just one more thing.

I think I should be more precise about the themes that I switch between. I have three themes, Gameplan, A child theme of gameplan and twentyfouteen. I get the problem with the child theme of gameplan. The parent theme Gameplan works so do also twentyfourteen. I have uploaded the templates from Arabica 2014 to the child theme, not the parent theme. Was that correct?

Henrik


Josh

  • Support Staff

December 2, 2014 at 4:43 pm

The templates should not be copied over from Arabica to the Gameplan child theme without converting them to work with Gameplan. Arabica is a child theme of twentyfourteen and is not intended to be used with other WordPress themes without modifying them. The Arabica templates would need to be retrofitted to work with Gameplan.


Henrik Sommar

December 3, 2014 at 9:05 am

The the theme gameplan was updated but still no success. I have sent you the theme and the child theme that we use to your support mail.

Josh,

Thank you for your reply but you get me confused here. The reason that i started this thread was because of your suggestion to use a template tag in the single event template. But I couldn’t figure out how, I didn’t know where the template was located. In this thread Lorentzo was kind to give me a very good instruction how I could use templates from the Arabica 2014 folder. When reading his post I didn’t get that impression that the templates were only for Twentyfourteen. So where are we now, back on square one?

Any way, I hope you still will be able to investigate the themes that I sent yhou to find why the event details doesn’t show.

Many thanks

Henrik


Lorenzo Orlando Caum

  • Support Staff

December 3, 2014 at 11:01 am

Hi Henrik,

We received the files. I unzipped them and uploaded to /wp-content/themes

Then I activated the child theme.

This appears to be working with the theme:

http://cl.ly/image/3D1I3D153b2k

The screenshot above is from a single event page.

Are there any specific settings to be aware of?


Lorenzo


Henrik Sommar

December 3, 2014 at 2:20 pm

Hi Lorenzo,

Very interesting and a step i the right direction. The question is what is different between the both setups. There is the theme options of course, there is plugins probably more. But your test and result gave me an idea. In your first instruction about copying templates you wrote that single_epresso-events.php should be renamed to old. I renamed it back and tried to use that file anyway and now it works. I should look in to this more deeply, both the settings and the change of the php-file. I’ll be back.

Many thanks
Henrik


Lorenzo Orlando Caum

  • Support Staff

December 3, 2014 at 3:33 pm

Hi Henrik,

Was that a copy of what is currently on your site? I just uploaded them as-is. No changes to any files were made.


Lorenzo


Henrik Sommar

December 11, 2014 at 10:12 am

Hi Lorenzo,

I have solved this issue. And I thought I should explain what I did.
In your instruction you wrote:

“duplicate a page.php theme template and rename to single-espresso_events.php. Now open that file for editing.
Towards the middle you should see a call for the content. That should be changed to this and save changes:
espresso_get_template_part( ‘content’, ‘espresso_events’ );

In the page.php It looked like following when I edited the row “get_template_part”

<div <?php post_class(); ?>>
<?php get_template_part(‘content’,’page’);?>
</div>

But in the file single_espresso-events.php form the Arabica 2014 folder it is following code:

<?php
// Start the Loop.
while ( have_posts() ) : the_post();
// Include the post TYPE-specific template for the content.
espresso_get_template_part( ‘content’, ‘espresso_events’ );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) {
//comments_template();
}
endwhile;
?>

To solve the problems with details not showing I removed the lines in page.php above and replaced them with lines form single_espresso-events.php above.

Why just only the details was missing in the first place I don’t know but it works this way.

Thanks for all your help.

Henrik

The support post ‘Editing the singel event 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Henrik Sommar 4 years, 11 months ago ago

Topic Tags

Tagged: 

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!
[for="input_96_5_3"]
[for="input_96_5_3"]
[gravityform id=96 title=false description=false]
  • This field is for validation purposes and should be left unchanged.
[i]
[i]
[gravityform id=69 title=false description=false]
  • This field is for validation purposes and should be left unchanged.