Roots Sage Symfony error when using override from template

Currenty I’m building a website with Roots Sage as my template. The template works like a charm. But for the import of vehicles we use a plugin. The override in the /resources/ is working. For example if I place in this file it shows me the title of the document.

But when I use the default formatting of the template it gives me errors like this:

Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function listing() on null in /wp-content/themes/mytheme/resources/view/voertuig/single.php:18

This is on line 18:

?= $voertuig-listing('merk', 'model', 'brandstof', 'transmissie', 'tellerstand', 'prijs'); ?

I’ve also asked the plugin builder to watch to this problem. He also tried some other things, but also got some errors

Notice: Undefined variable: wp_query in /wp-content/themes/mytheme/resources/view/voertuig/archive.php on line 23

Notice: Trying to get property 'found_posts' of non-object in /wp-content/themes/mytheme/resources/view/voertuig/archive.php on line 23

When I switch to twentynineteen theme the override works like a charm.

Any ideas of how to fix this issue or is there anyone who can point me in the right direction?

Topic theme-roots php templates Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.