Closed frozzare closed 6 years ago
Example using Sage theme.
// Today remove_filter('template_include', 'papi_template_include'); add_filter('template_include', function ($orginal) { $new = papi_template_include($orginal); if ($orginal === $new) { return $orginal; } echo template($new); return get_stylesheet_directory().'/index.php'; }); // After (example) // $template = 'pages/video.php' add_filter('papi_template_include', function ($orginal) { $new = papi_template_include($orginal); if ($orginal === $new) { return $orginal; } echo template($new); return get_stylesheet_directory().'/index.php'; } );
Fixed by https://github.com/wp-papi/papi/commit/1655c1b78d2c8ac6a4074849e2b2fe79d9609a5c
add_filter( 'papi/pre_template_include', function ($orginal) { return $orginal; } );
Example using Sage theme.