this is working
This commit is contained in:
11
page.php
11
page.php
@@ -50,11 +50,12 @@ function posts_by_service($numberposts=-1,$postslug,$slug,$template_name='posts_
|
||||
return Timber::fetch($template_name, $ctx);
|
||||
}
|
||||
|
||||
|
||||
add_filter( 'timber/twig', function( \Twig_Environment $twig ) {
|
||||
$twig->addFunction( new Timber\Twig_Function( 'posts_by_service', 'posts_by_service' ) );
|
||||
/*
|
||||
add_filter( 'timber/twig', function( \Twig\Environment $twig ) {
|
||||
$twig->addFunction( new \Twig\TwigFunction( 'posts_by_service', 'posts_by_service' ) );
|
||||
return $twig;
|
||||
} );
|
||||
*/
|
||||
// fin del templatetag
|
||||
|
||||
Timber::render( $templates, $context );
|
||||
//var_dump($context);
|
||||
Timber::render($templates, $context );
|
||||
|
||||
Reference in New Issue
Block a user