PHP code example of tmf / wp-simple-templating
1. Go to this page and download the library: Download tmf/wp-simple-templating 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/ */
tmf / wp-simple-templating example snippets
// load the vendors via composer autoload
if (file_exists( __DIR__ . '/vendor/autoload.php')) {
ner
$services = new Pimple\Container();
// register the templating service (for templates in the ./templates directory)
$services->register(
new SimpleTemplatingServiceProvider('templating'),
array('templating.directory' => 'templates') // set up the "templates" directory as the "templating.directoy" configuration parameterin the service container
);
bash
cd your-theme-directory
# install composer phar
curl -sS https://getcomposer.org/installer | php
# create a basic composer.json
./composer.phar init