1. Go to this page and download the library: Download wpscholar/templatex library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wpscholar / templatex example snippets
// Define your template paths
$templatePaths = [ __DIR__ . '/templates/' ];
// Create a new instance
$x = new wpscholar\TemplateX( $templatePaths );
// Set a template (relative to the template path)
$x->setTemplate( 'event.php' );
// Pass variables to your template
$x->setContext( [
'title' => 'County Fair',
'venue' => 'County Fairgrounds',
] );
// Render the template
echo $x->render();