Posted: 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. |
|
I think the event category is not being added to the page body class list. |
|
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:
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 |
|
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 |
|
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 /** Replace the standard loop with our custom loop */ genesis(); Everything displays well this way except the main entry. |
|
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. — |
|
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.) |
|
Hi Michael, My suggestion was based on this:
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? — |
|
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. |
|
Some further information: |
|
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? |
|
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.
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. |
|
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 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] |
|
Yes, I’ve been working with it that way. I can confirm that Description is not showing neither the Entry nor the Venue Description. |
|
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. |
|
Thanks Josh. Unfortunately, it doesn’t display in Genesis either. |
|
That is so strange. So, can you try temporarily deactivating any other plugins that might be active to see if those are affecting this? |
|
Odd–I disabled everything but EE plugins, and it still didn’t show. THen I disabled EE4 Calendar plugin, which caused two things: Turn Calendar back on, and it would toggle again. Either way, no Description. |
|
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. |
|
yes, 1.2 |
|
Does this happen for you with the twentyfourteen active? |
|
yes |
|
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? |
|
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. |
|
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? |
|
disabled plugins-no difference enabled or disabled: 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 |
|
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. |
|
my functions file hasn’t changed since then either. |
|
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. |
|
Hi Michael, We can look into this further if you can outline the steps on how to reproduce this. |
|
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. |
|
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. |
|
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. |
|
Who is your web host? — |
|
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. |
|
Yes, I’m seeing this on WP Engine as well. I’ve contacted them about this issue. — |
|
OK, thank you. Let me know if I can help to follow up. |
|
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. |
|
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. |
|
|
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. |
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/? |
|
|
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. |
good to know, thanks. |
|
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: |
|
wonderful, thank you very much! You’ve been so generous with support. I haven’t heard back from WPE either. |
|
|
This worked for me too. Thank you Josh! |
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. |
|
|
@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? |
I noticed this too. I also think it prevents other plugins from adding items to the Admin sidebar. |
|
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. |
|
FYI: |
|
Hi Michael, I’m not sure what you’re referring to. Can you elaborate? |
|
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. |
|
Hi Michael, Thanks for the update. |
|
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.