1. Go to this page and download the library: Download rmp-up/wp-twig 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/ */
rmp-up / wp-twig example snippets
wp_twig_register();
add_filter(
'init',
static function () {
global $wp_query;
$wp_query->query_vars['user'] = wp_get_current_user();
}
);