Support

Home Forums Event Espresso Premium Call to undefined function espresso_pagination() in Child Theme

Call to undefined function espresso_pagination() in Child Theme

Posted: December 12, 2015 at 7:12 am

Viewing 2 reply threads


drkings1

December 12, 2015 at 7:12 am

I am running a child theme of the latest Total v 3.2.0 http://totaltheme.wpengine.com/

If I activate the default WordPress 2015 mydomain.com/events/ loads just fine with event data.

If I just activate the latest Total theme (v3.2.0 http://totaltheme.wpengine.com/) I just get the default blog output so I see just Title and Content.

I therefore followed details here to customise templates https://gist.github.com/lorenzocaum/16aac08f099d7c154f04 via my child theme.

I can now get my event Archive page to show event details but I now get an error

Fatal error: Call to undefined function espresso_pagination() in C;\mypath\loop-espresso_events.php on line 46

Really I just want to get the default event archive and shouldn’t need to be customising templates in the child theme.

WordPress Version:
4.4
PHP Version:
5.5.24
MySQL Version:
5.6.24
Event Espresso Version:
4.8.26.p


drkings1

December 13, 2015 at 6:32 am

The problem was my parent theme was doing something a bit tricky when it came across a CPT.

// Get layout blocks
$blocks = wpex_entry_blocks();
// Loop through blocks and get template part
foreach ( $blocks as $block ) {
	get_template_part( 'partials/cpt/cpt-entry-'. $block, get_post_type() );
} 

The solutions was in my child theme to just avoid the above by calling the WP the_content function which allowed the EE plugin to filter it.

if (get_post_type() == "espresso_events") {
	the_content( '', '…' ); 
} else {
	get_template_part( 'partials/cpt/cpt-entry', get_post_type() ); 
}


Tony

  • Support Staff

December 13, 2015 at 2:10 pm

Hi there,

Thank you for letting us know.

So I assume you have not removed the template files from the link above and simply use the single template file needed to make the above modification in your child theme, is that correct?

Viewing 2 reply threads

The support post ‘Call to undefined function espresso_pagination() in Child Theme’ 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