Search code examples
phpwordpresstwigtimber

Detailed explanation of how to add "Twig_Extension_Debug" to Wordpress/Timber


I have to add Twig_Extension_Debug because I really need this function for debugin. People have told me that I need to manually add the Twig_Extension_Debug. I looked at the explanation in the TWIG Website, however I lack the understanding of where I should add it. Adding it to the functions.php in Wordpress does nothing. Where do I add it?


Solution

  • Did you already look at the Debugging Guide? In Timber, the Timber_Debug_Extension is automatically added when you set WP_DEBUG to true in your wp-config.php file. You can then use {{ dump() }} in your Twig files.