Support

Home Forums Event Espresso Premium EE4 event template customization

EE4 event template customization

Posted: September 26, 2014 at 2:32 pm

Viewing 53 reply threads


Michael

September 26, 2014 at 2:32 pm

I would like to change just a couple of things in the Event template, but I can’t figure out which file to edit.

I want the event description and image to appear at the top of the page, instead of after the event date/time part.

I also am having the Event Category show up underneath the venue name, rather than at the bottom of the post on the Filed Under line.


Michael

September 26, 2014 at 3:49 pm

I think the event category is not being added to the page body class list.


Josh

  • Support Staff

September 26, 2014 at 6:30 pm

Hi Michael,

The files you’ll end up editing will be in your WordPress theme, and we recommend making this happen using a create a child theme.

The first step is to find your single post template and duplicate of it. You’ll rename the duplicate single-espresso_events.php.

Inside your new single-espresso_events.php, place this line of code somewhere within the loop:

<?php espresso_get_template_part( 'content', 'espresso_events' ); ?>

Please note: The PHP open/close tags may not be needed depending on how your theme is structured.

Then, open up the Event Espresso plugin’s /public folder, and you’ll find a bunch of templates in there. You copy the content-espresso_events.php file into your theme, and re-arrange the items in that template as desired.

You can add the event category to the post class by adding some code to your child theme’s functions.php file. Here’s a link to the documentation where you’ll find this:

https://eventespresso.com/wiki/useful-php-code-snippets/#category-css


Michael

September 29, 2014 at 8:38 am

Thanks Josh, that worked great.

One last question: the event description is missing. This is the post content. What can I add to content-espresso_events to pull regular Post body content? Thanks


Michael

September 29, 2014 at 2:46 pm

I think the problem here is the Genesis framework puts entry content into ( ‘genesis_entry_content’, ‘genesis_do_post_content’ );

I’m using the following in single-espresso_events
function my_custom_loop() {
espresso_get_template_part( ‘content’, ‘espresso_events’ );
}

/** Replace the standard loop with our custom loop */
remove_action( ‘genesis_loop’, ‘genesis_do_loop’ );
add_action( ‘genesis_loop’, ‘my_custom_loop’ );

genesis();

Everything displays well this way except the main entry.


Lorenzo Orlando Caum

  • Support Staff

September 29, 2014 at 5:06 pm

Hi Michael,

Could you give the solution in the post below a try in your child theme’s functions.php file or a site specific plugin?

https://eventespresso.com/topic/saving-cutomized-plugin-files-from-being-overwritten/#post-119771

It should relocate the tickets and datetimes after the event image and description.

Let us know if it works as expected.


Lorenzo


Michael

September 30, 2014 at 9:39 am

Thanks Lorenzo.

That doesn’t work. There might have been a miscommunication here.

I followed Josh steps to create a new template for EE posts and I’ve edited content-espresso_events to rearrange the sections.

The problem is that this new template doesn’t show the Entry. (because it isn’t using Genesis terms?)

I think this is a conflict between content-espresso_events file and the Genesis framework. I think the call for Entry content needs to be modified for Genesis, something like genesis_entry_content. I tried a few things but no luck.

(entry content DID show when I was just using the straight Genesis single template, but I was missing some features from content-espresso_events.)


Lorenzo Orlando Caum

  • Support Staff

September 30, 2014 at 1:03 pm

Hi Michael,

My suggestion was based on this:

I want the event description and image to appear at the top of the page, instead of after the event date/time part.

However, if you have other templates setup, then it may not work as expected.

What version of Genesis are you using and are you still looking to make the change above?


Lorenzo


Michael

September 30, 2014 at 1:08 pm

Yeah, it’s my fault for combining questions again.

I’ve moved on from the ordering issue; Josh’s solution worked.

Now the issue is that Entry content is missing.

It’s Genesis 2.1.2.

You can see the code I’m using in the post before my last.


Michael

September 30, 2014 at 2:35 pm

Some further information:
The Table Template also cannot pull description (entry)
The Calendar and Calendar widget can


Josh

  • Support Staff

October 1, 2014 at 12:13 pm

Hi Michael,

I would have given you different suggestions had I known you were working with Genesis. Typically with Genesis you’ll want to try to use hooks were possible. You’re on the right track with replacing the genesis loop, when you remove the standard loop, you’ll need to replace it with another loop instead of a function call to a template part. Can you try copying over the loop-espresso_events.php file into your theme, modify its markup to match your theme if need be, and use that inside your custom loop?


Michael

October 1, 2014 at 1:04 pm

Josh, I tried to follow what you said, but I admit I’m a little confused about how exactly this is working.

Regardless, it is working now. I copied most of loop-espresso_events.php into the sing-espresso_events template.

function my_custom_loop() {
   if ( have_posts() ) : ?>
	
	<?php 
		// allow other stuff
		do_action( 'AHEE__archive_espresso_events_template__before_loop' ); 
		// Start the Loop.
		while ( have_posts() ) : the_post(); 
			// Include the post TYPE-specific template for the content.
			espresso_get_template_part( 'content', 'espresso_events' );
		endwhile;
		// Previous/next page navigation.
		
		// allow moar other stuff
		do_action( 'AHEE__archive_espresso_events_template__after_loop' );

	else :
		// If no content, include the "No posts found" template.
		espresso_get_template_part( 'content', 'none' );
		
	endif;
}
 
/** Replace the standard loop with our custom loop */
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'my_custom_loop' );

genesis();

I took out line 44 of the loop-espresso_events file (espresso_pagination();) because it threw an error–I guess because it’s a single entry. I also removed the header.

Should I start a new topic to do the same for EE Table Template? Its Description field is blank. It has its own loop, and it looks a little more complicated.


Josh

  • Support Staff

October 1, 2014 at 1:48 pm

Hi Michael,

It turns out the EE Table Template isn’t something you add to your theme. You activate it as a pluign, then you add the [ESPRESSO_EVENTS_TABLE_TEMPLATE] shortcode to a page.

Did you try adding the following to a WP page via the editor:

[ESPRESSO_EVENTS_TABLE_TEMPLATE template_file = espresso-events-table-template-toggle.template.php]


Michael

October 1, 2014 at 1:51 pm

Yes, I’ve been working with it that way. I can confirm that Description is not showing neither the Entry nor the Venue Description.


Josh

  • Support Staff

October 1, 2014 at 2:24 pm

I can confirm the Event’s description is displaying in the table with Genesis active. Can you temporarily switch to the main Genesis theme and check again? This will help narrow down what’s causing the issue.


Michael

October 1, 2014 at 2:27 pm

Thanks Josh. Unfortunately, it doesn’t display in Genesis either.


Josh

  • Support Staff

October 2, 2014 at 7:49 am

That is so strange. So, can you try temporarily deactivating any other plugins that might be active to see if those are affecting this?


Michael

October 2, 2014 at 8:38 am

Odd–I disabled everything but EE plugins, and it still didn’t show.

THen I disabled EE4 Calendar plugin, which caused two things:
toggle button won’t display
table loses its alternate row gray/white striping style (js?)

Turn Calendar back on, and it would toggle again. Either way, no Description.


Josh

  • Support Staff

October 2, 2014 at 10:35 am

Hi Michael,

Can you check to see if you’re running the current version of the events table template? It’s currently at version 1.2.


Michael

October 2, 2014 at 10:40 am

yes, 1.2


Josh

  • Support Staff

October 2, 2014 at 10:50 am

Does this happen for you with the twentyfourteen active?


Michael

October 2, 2014 at 10:55 am

yes


Josh

  • Support Staff

October 2, 2014 at 11:19 am

Okay, can you let me know what’s in the event description? Are there any shorttags or images, or anything other than plain text with simple html tags?

Along with that, can you check to see what happens if you enter an excerpt for the event?


Michael

October 2, 2014 at 11:46 am

just plain text, or plain text and images don’t show. excerpt doesn’t show either.

I encountered this problem before my latest crisis, but mentioning here anyway.
https://eventespresso.com/topic/event-editor-not-working/


Josh

  • Support Staff

October 2, 2014 at 11:53 am

I think your crises may be related. Can you let me know the names of the plugins that you deactivated? Along with that can you post a copy of the functions.php file that’s from the theme you’re developing into a pastebin or gist and post a link here?


Michael

October 2, 2014 at 12:02 pm

http://pastebin.com/8bswwE7g

disabled plugins-no difference enabled or disabled:
Akismet

Easy Theme and Plugin Upgrades

ELI’s SQL Admin Reports Shortcode and DB Backup

Event Espresso – Calendar

Event Espresso – Events Table View Template (EE4.3+)

Event Espresso – Grid View Template (EE4.3+)

Event Espresso – MailChimp (EE4.3+)

Genesis Simple Edits

Intense WordPress Plugin

Justified Image Grid

WooSidebars

WP Smush.it


Michael

October 2, 2014 at 12:09 pm

So the event editor was working on monday. Since then I only duplicated events, so I don’t know when it stopped working. I didn’t add any plugins since then.

This is all on a development environment. It might just be easier for me to start clean, wouldn’t take me long. But I wanted to mention in case this is a bug that you’re interested in investigating.


Michael

October 2, 2014 at 1:05 pm

my functions file hasn’t changed since then either.


Michael

October 2, 2014 at 1:08 pm

I think this must have happened when I deactivated/reactivated all of the plugins when troubleshooting something else, though like I said doing same doesn’t help now.


Josh

  • Support Staff

October 2, 2014 at 1:35 pm

Hi Michael,

We can look into this further if you can outline the steps on how to reproduce this.


Michael

October 2, 2014 at 3:08 pm

Hi–I just created a fresh WP install on a new subdomain and installed 4.4.3 and the event editor doesn’t work there either. No caching, no plugins, just EE. Doesn’t work in Chrome or IE.
I’m talking to my host but they don’t have any ideas.


Michael

October 2, 2014 at 3:29 pm

clicking Add Date/Time, for example, asks the page to reload. I can’t access advanced ticket or date time options.

This has to be the host, right?

I tried 4.4.3 and the 4.5 beta on a fresh environment.


Michael

October 2, 2014 at 4:12 pm

ok, the host has convinced me it is not them. They did not push any relevant updates, they have PHP 5.3.

So weird. Was working fine Monday.


Lorenzo Orlando Caum

  • Support Staff

October 2, 2014 at 4:49 pm

Who is your web host?


Lorenzo


Michael

October 2, 2014 at 5:11 pm

WPEngine.

I’m willing to buy a token to expedite this.

If you look up WPEngine, you will see that they are a managed provider with their own caching. However, they provide a way to disable that, which I did on a fresh install on a new subdomain to try to have as clean an environment as possible.

I’ll also observe that the month changed yesterday–wouldn’t be the first time that caused a problem for me.


Lorenzo Orlando Caum

  • Support Staff

October 2, 2014 at 5:21 pm

Yes, I’m seeing this on WP Engine as well. I’ve contacted them about this issue.


Lorenzo


Michael

October 3, 2014 at 7:07 am

OK, thank you. Let me know if I can help to follow up.


Josh

  • Support Staff

October 3, 2014 at 7:51 am

Hi Michael,

I think this is due to a recent change on WPEngine’s side. I have a personal site running Event Espresso 4 on WPEngine that I use to organize group bike rides. It all worked fine the last time I added an event. I went and checked today and the ticket editor no longer works for me either.

I opened up a support ticket with them, and I can advise doing the same. If they are not responsive, I’m going to have to move my personal site to another host.


Michael

October 3, 2014 at 8:08 am

Thanks Josh. I opened a ticket too.

I’ll table my Table Description field problem until we hear from WPE.

If we have to move, I’ll be interested to know who you pick.


McDill Design

October 3, 2014 at 8:10 am

I’m having the exact same issue with the Event Editor – also using WPEngine. It was working fine until sometime yesterday. Now I can’t add new times, tickets or even change the status. All those links just refresh the page. Please let me know if you find a fix. The site is currently on development for we need to go live next week so I’m really hoping someone figures this out very soon.

Related note: the event registration page wasn’t working properly when I was logged out of WordPress. I found out I needed to ask WPEngine to turn off cache for that page and that fixed the issue.. in case anyone else is having the same issue.


Michael

October 3, 2014 at 8:15 am

McDill, I haven’t yet tried to register when not logged in.

How did you disable the cache? Did you do it for all posts in /events/?


McDill Design

October 3, 2014 at 8:22 am

I opened a support ticket at WPEngine and asked them to turn off the cache for the url of the registration page, which is the same page for all events. Here’s a post about it: http://wpengine.com/support/wpengine-ecommerce/

The site is currently under the installname.wpengine.com url so I also gave them the final url once the site goes live.


Michael

October 3, 2014 at 8:28 am

good to know, thanks.


Josh

  • Support Staff

October 3, 2014 at 10:29 am

A little update on this: I haven’t heard back from WPEngine on this, but Darren and I have worked through troubleshooting this and found that WPEngine disallows the WordPress Heartbeat API except for a few pages in the WordPress admin (like the create a post and create a page pages in the aadmin).

Here’s a little function you can add to your theme’s functions.php file or into a custom snippet plugin that will make it so the Heartbeat API loads as expected:


Michael

October 3, 2014 at 10:34 am

wonderful, thank you very much! You’ve been so generous with support.

I haven’t heard back from WPE either.


McDill Design

October 3, 2014 at 1:15 pm

This worked for me too. Thank you Josh!


Josh

  • Support Staff

October 3, 2014 at 1:34 pm

You’re welcome. I sent a tweet over to WPEngine support and asked them to document that they’re doing this, and to make an option to re-enable the WP Heartbeat API.

https://twitter.com/joshfeck/status/518097629335781377


McDill Design

October 6, 2014 at 12:26 pm

@Josh, when I added your fix, I couldn’t edit regular pages. For example, I couldn’t edit the permalink or the page status. If I remove your code from the functions.php file, now the Edit pages works fine. Do we need to add other pages to the $heartbeat_allowed_pages array?


Michael

October 6, 2014 at 12:49 pm

I noticed this too.

I also think it prevents other plugins from adding items to the Admin sidebar.


Josh

  • Support Staff

October 6, 2014 at 1:33 pm

You will need to add other pages to the array to restore basic WP functionality. I’ve added a few more the the gist I posted here:

https://gist.github.com/joshfeck/b4aa84c0938afdec2c5d

Please check with WPEngine and ask them if there are any additional pages that should be added. They added the filter and the function that disables the core WP Heartbeat functionality. I’d be helpful if they can publish some documentation on how work around the restrictions they put in place.


Michael

October 8, 2014 at 7:21 am

FYI:
1. I was wrong, it isn’t affecting other plugins
2. From the developer:
“The update we pushed pertained to the PCRE library. That should not effect most plugins, since it was not a very large change.”


Josh

  • Support Staff

October 8, 2014 at 7:49 am

Hi Michael,

I’m not sure what you’re referring to. Can you elaborate?


Michael

October 8, 2014 at 7:54 am

At first I thought WPE’s server update that broke EE also broke another one of my plugins, but it didn’t.

Also, I was just passing along what the dev said regarding the update. PCRE doesn’t mean anything to me, but apparently they think that is what affected Heartbeat functionality.


Josh

  • Support Staff

October 8, 2014 at 8:41 am

Hi Michael,

Thanks for the update.

Viewing 53 reply threads

The support post ‘EE4 event template customization’ 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