Support

Home Forums Event Espresso Premium Snipet Busted WordPress

Snipet Busted WordPress

Posted: September 30, 2017 at 11:20 am

Viewing 7 reply threads


robert sirkis

September 30, 2017 at 11:20 am

I need immediate help!! Registration for an event is opening in 12 hours.

Tried to add the below snippet to the plug in and now the website just goes to a blank page. Event the admin site so I can’t go back and remove it.

<?php
//* Please do NOT include the opening php tag, except of course if you’re starting with a blank file
add_filter(
‘FHEE__espresso_list_of_event_dates__datetime_html’,
‘my_add_total_spaces_display’,
10,
2
);
function my_add_total_spaces_display( $html, $datetime ) {
$html .= ‘<br><span class=”space-remain”>Total spaces remaining: ‘;
$html .= $datetime->total_tickets_available_at_this_datetime();
$html .= ‘</span>’;
return $html;
}


robert sirkis

September 30, 2017 at 11:22 am

Update, I can log into the admin page, but can’t access the plugins.


robert sirkis

September 30, 2017 at 11:31 am

Update – I can’t access the admin page after all.


robert sirkis

September 30, 2017 at 12:21 pm

Update – i was able to get the plug in disabled. Now when I remove the snippet I get the below error.

Parse error: syntax error, unexpected end of file in /www/wp-content/plugins/event-espresso-core-reg/espresso.php on line 282

How can I correct this?


robert sirkis

September 30, 2017 at 12:36 pm

Update – I used the data from another website that I use EE for and was able to find the missing piece. This is resolved.


Tony

  • Support Staff

October 2, 2017 at 2:46 am

Hi there,

Tried to add the below snippet to the plug in and now the website just goes to a blank page. Event the admin site so I can’t go back and remove it.

It’s highly recommended to use FTP or some form of file manager available through your host’s control panel and not the built-in WP code editor for the very reason you’ve found here. If something goes wrong you then can’t access the site again and need to use FTP or similar to access the code/plugin.

Parse error: syntax error, unexpected end of file in /www/wp-content/plugins/event-espresso-core-reg/espresso.php on line 282

That likely means there was a missing } from the end of the file.

Did you add the snippet to espresso.php?


robert sirkis

October 3, 2017 at 9:58 am

I tried to add teh snippet directly to the EE plugin through WP.


Tony

  • Support Staff

October 3, 2017 at 10:04 am

Yeah that’s why you’re running into problems, you don’t need to add snippets to EE core files, they go in their own plugin:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Also editing any plugins (and/or themes) through the WP Admin is asking for trouble, one wrong move and you’ll be locked out, meaning you then need to use FTP to revert the change you just made or de-activate the plugin/theme you edited to get the site back up. If you don’t have that info your stuck until you get it or your host disabled the plugin for you.

Edit your files using FTP, then when you refresh the page if there is a problem you can still access the files through FTP to fix the problem.

Viewing 7 reply threads

The support post ‘Snipet Busted WordPress’ 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