Error when using custom endpoints / templates
-
Hi,
I have created a couple custom endpoints and whenever the endpoint is accessed and Kadence theme template is used, I get the following error:
Warning: First parameter must either be an object or the name of an existing class in /path/wp-content/themes/kadence/template-parts/content/archive_hero.php on line
I am using the template_include filter to load my own templates for these endpoints, but in some cases I would like to return a default template, such as the 404 template when needed. But I also get the error above when doing so. The error is also present if I disable my template_include filter and Kadence tries to load one of it’s own templates.
Not sure if this something that can be addressed – my alternate testing theme (Elementor Hello) does not have this issue as their templates are very basic.
Any ideas? Or is that just the way Kadence is when it comes to templates?
Cheers.
- The topic ‘Error when using custom endpoints / templates’ is closed to new replies.