PHPackages                             tmf/wp-simple-templating - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. tmf/wp-simple-templating

ActiveLibrary

tmf/wp-simple-templating
========================

A service that lets wordpress themes be more flexible with the template locations

v0.1.4(11y ago)133PHPPHP &gt;=5.4.0

Since Nov 15Pushed 11y ago2 watchersCompare

[ Source](https://github.com/tmf/wp-simple-templating)[ Packagist](https://packagist.org/packages/tmf/wp-simple-templating)[ RSS](/packages/tmf-wp-simple-templating/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

Simple Templating Pimple Service for WordPress Themes
=====================================================

[](#simple-templating-pimple-service-for-wordpress-themes)

This Pimple service allows the developer to place the query templates and page templates of a WordPress theme at a custom location. This allows a cleaner, more organized theme structure.

Usage
-----

[](#usage)

This service is installable via [Composer](https://getcomposer.org/) and relies on it's class autoloading mechanism. You can package the vendor directory with you theme or plugin, with your WordPress installation or with a setup of your choosing.

1. Create a composer project for your plugin or theme:

    ```
    cd your-theme-directory
    # install composer phar
    curl -sS https://getcomposer.org/installer | php
    # create a basic composer.json
    ./composer.phar init
    ```
2. Add the simple templating service as a dependency in your composer.json

    ```
    ./composer.phar require tmf/wp-simple-templating ~0.1
    ```
3. Create a pimple container and register the simple templating service

    ```
    // load the vendors via composer autoload
    if (file_exists( __DIR__ . '/vendor/autoload.php')) {
        require_once __DIR__ . '/vendor/autoload.php';
    }

    use Tmf\Wordpress\Service\SimpleTemplatingServiceProvider;

    // create the service container
    $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
    );
    ```
4. Place all your query templates (`index.php`, `single.php`, `single-cpt.php`, ...) in the `templates` directory. You can place additional template parts in this directory structe and call them with `get_template_parts('templates/partial/header.php')`
5. `index.php` still needs to be exist at the root level of the theme, but you can leave it empty (or throw an exception).

Unfortunately get\_header() and get\_footer() won't work, WordPress will try to load the BackCompat mode...

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Total

5

Last Release

4140d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/216cd4bf21dbff1de4f4a7f2992123132d4cc21f265831ef69bdbc1f5228035e?d=identicon)[tmf](/maintainers/tmf)

---

Top Contributors

[![tmf](https://avatars.githubusercontent.com/u/1573003?v=4)](https://github.com/tmf "tmf (11 commits)")

### Embed Badge

![Health badge](/badges/tmf-wp-simple-templating/health.svg)

```
[![Health](https://phpackages.com/badges/tmf-wp-simple-templating/health.svg)](https://phpackages.com/packages/tmf-wp-simple-templating)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
