Support

Home Forums Event Espresso Premium Call to undefined function espresso_get_template_part()

Call to undefined function espresso_get_template_part()

Posted: July 12, 2017 at 8:01 am

Viewing 3 reply threads


Alan Barclay

July 12, 2017 at 8:01 am

Apache log is full with the following;


HP Fatal error:  Uncaught Error: Call to undefined function espresso_get_template_part() in /var/www/html/wp-content/themes/theme/tpl-landing.php:109\nStack trace:\n#0 /var/www/html/wp-includes/template-loader.php(74): include()\n#1 /var/www/html/wp-blog-header.php(19): require_once('/var/www/html/w...')\n#2 /var/www/html/index.php(17): require('/var/www/html/w...')\n#3 {main}\n  thrown in /var/www/html/wp-content/themes/theme/tpl-landing.php on line 109

The site is currently broken because of this;

https://gist.github.com/lorenzocaum/524635803726ba942862bbb76526d220

Can someone point me to the right direction? I’ve checked the plugin conflict list – seems okay.


Josh

  • Support Staff

July 12, 2017 at 8:31 am

Hi there,

You’ll need to fix the code in tpl-landing.php on line 109. Instead of:

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

You change it to:

<?php get_template_part( 'content', 'espresso_events-header' ); ?>


Alan Barclay

July 12, 2017 at 9:43 am

Hi Josh,

Thank you, all fixed. Was this a change in the plugin or someone accidentally put espresso in front off get_template_part() function? All the template files are full with it – just making sure before I go ahead and changing them all.


Josh

  • Support Staff

July 12, 2017 at 11:06 am

You don’t necessarily need to change them all. Your tpl-landing.php template is using a non-standard query so the espresso_get_template_part() function isn’t loaded. A template that loads the Event Espresso event post type via a standard query may load the espresso_get_template_part() function, in which case it can be used there.

Viewing 3 reply threads

The support post ‘Call to undefined function espresso_get_template_part()’ 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