PHP code example of bigboxwc / wp-template-loader

1. Go to this page and download the library: Download bigboxwc/wp-template-loader 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/ */

    

bigboxwc / wp-template-loader example snippets


( new \BigBoxWC\WP_Template_Loader\Loader() )::watch();

( new \BigBoxWC\WP_Template_Loader\Loader( [
	'base_path'    => 'resources/templates',
	'layout_dir'   => 'wp-pages',
	'partials_dir' => 'parts',
] ) )::watch();

\BigBoxWC\WP_Template_Loader\Loader::view( 'my-view' );

$view = \BigBoxWC\WP_Template_Loader\Loader::get_view( 'my-view' );

\BigBoxWC\WP_Template_Loader\Loader::view( 'global/header' );

\BigBoxWC\WP_Template_Loader\Loader::view( 'global/header', [
	'min' => true,
] );