PHPackages                             nonfiction/theme - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nonfiction/theme

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nonfiction/theme
================

Reusable WordPress theme foundation for nonfiction projects.

1481PHP

Since Jun 24Pushed 1mo agoCompare

[ Source](https://github.com/nonfiction/theme)[ Packagist](https://packagist.org/packages/nonfiction/theme)[ RSS](/packages/nonfiction-theme/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Nonfiction Theme
================

[](#nonfiction-theme)

Reusable WordPress + Timber theme foundation for Nonfiction projects.

This package provides shared theme infrastructure only: helpers, bootstrapping, asset enqueueing, Vite manifest parsing, Timber adapters, and WordPress registration utilities. Site-specific content, templates, blocks, routes, and design belong in the consuming theme.

Install
-------

[](#install)

Install from Packagist:

```
composer require nonfiction/theme
```

Packagist package:

Use a Composer path repository only while developing this package locally:

```
{
  "repositories": [
    {
      "type": "path",
      "url": "../../theme"
    }
  ],
  "require": {
    "nonfiction/theme": "*"
  }
}
```

Requirements
------------

[](#requirements)

- PHP `>=7.4`
- WordPress
- `timber/timber` `^2.5.1`
- `icanboogie/inflector` `^4.0`

Namespace
---------

[](#namespace)

Classes and helper functions live under `Nonfiction\Theme`.

Composer autoloads:

- `Nonfiction\Theme\` from `src/`
- `src/helpers.php` as an autoloaded file

Bootstrapping
-------------

[](#bootstrapping)

In the consuming theme, require Composer's autoloader and initialize the shared theme foundation from your theme entry point, typically `functions.php`:

```
