79339833

Date: 2025-01-08 15:53:03
Score: 1
Natty:
Report link

To register a custom location you need to pass a key to the paths array.

e.g.:

add_filter('timber/locations', function ( $paths ) {
   $paths['some_key'] = [
       $dirPath . '/views',
       //add more paths if needed
   ];

   return $paths;
});

For further details, see the Timber 2.0 Docs

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Johannes Reiter