PHP code example of wpfulcrum / template

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

    

wpfulcrum / template example snippets




return [
    'autoload' => true,
    'config'   => [
        'templateFolderPath' => __DIR__ . '/path/to/the/templates/',
        'postType'           => 'book',
        'useSingle'          => true,
        'useArchive'         => true,
        'useTax'             => true,
        'taxonomy'           => 'genre',
        'usePageTemplates'   => true, // set to false when there are no custom page templates.
    ],
];



return [
    'autoload' => true,
    'config'   => [
        'usePageTemplates'   => true,
        'templates'          => [
            'template-books.php' => __("Book Entry Template"),
        ],
    ],
];

	'serviceProviders' => [
        'template.book'   => [
            'provider' => 'provider.template',
            'config'   => __DIR__ . '/template/book-genre.php',
        ],
        'adminTemplate.books'   => [
            'provider' => 'provider.adminTemplate',
            'config'   => __DIR__ . '/template/page-templates.php',
        ],        
	],