ralfhortt/wp-template-loader

A helper class to load template files from another location

1.1.2 2023-05-04 20:10 UTC

This package is auto-updated.

Last update: 2024-05-04 22:07:37 UTC


README

A helper class to load template files from another location

Installation

$ composer require ralfhortt/wp-template-loader

Usage

<?php
use RalfHortt\TemplateLoader\TemplateLocator;

// Will load WordPress front page from `views/front-page.php`
(new TemplateLocator('views'))->register();

More Information about the WordPress hierarchy

https://wphierarchy.com/