PHP code example of lin3s / template-selector
1. Go to this page and download the library: Download lin3s/template-selector 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/ */
lin3s / template-selector example snippets
add_filter('template_selector_available', [$this, 'templates']);
public function templates($templates) {
return array_merge($templates, [
'template-slug' => 'Template name shown in admin',
'another-template' => 'Another template'
]);
}