0

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?

2
  • Where is $voertuig defined in the single.php? Are you using Sage 9 or Sage 10 (alpha)?
    – kero
    Commented Oct 24, 2019 at 15:19
  • I'm using Sage 9, and the plugin developer said this is a hook on the wp_query
    – Wouter
    Commented Oct 25, 2019 at 11:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.