PHPackages                             gamajo/genesis-theme-toolkit - 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. gamajo/genesis-theme-toolkit

AbandonedArchivedLibrary

gamajo/genesis-theme-toolkit
============================

Building blocks for developing a config-based Genesis child theme for WordPress.

0.6.0(8y ago)171462MITPHPPHP ^7.1CI failing

Since Jun 27Pushed 8y ago2 watchersCompare

[ Source](https://github.com/gamajo/genesis-theme-toolkit)[ Packagist](https://packagist.org/packages/gamajo/genesis-theme-toolkit)[ RSS](/packages/gamajo-genesis-theme-toolkit/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (7)Versions (8)Used By (0)

Genesis Theme Toolkit
=====================

[](#genesis-theme-toolkit)

Building blocks to develop a config-based Genesis Framework child theme for WordPress.

When building a theme, wouldn't it be nice to separate out the implementation-specific config, from the reusable logic? This is the premise upon which the [Using a Config to Write Reusable Code](https://www.alainschlesser.com/config-files-for-reusable-code/) series articles are written, and which this package enables.

Specifically, this packages builds upon the [Theme Toolkit](https://github.com/gamajo/theme-toolkit) package, and adds *bricks* that are specific to Genesis child theme development. It provides an easy way to:

- Filtering the default Genesis breadcrumb arguments.
- Registering and unregistering Genesis layouts.
- Unregistering templates inherited from Genesis (extends Theme Toolkit functionality)
- Filters Genesis theme settings defaults, or forces them to specific values.
- Register and unregister widget areas, added by Genesis (extends Theme Toolkit functionality)
- Customise the footer credits string.
- Implement a custom inline logo using WordPress `add_theme_support( 'custom-logo' )` functionality.

Why?
----

[](#why)

The ThemeToolkit and GenesisThemeToolkit packages are for theme customisations - what theme support to add, what CSS/JS dependencies to add in, how many footer widgets to allow, what layouts to add/remove, what image sizes there should be - all stuff that would historically gone into `functions.php` or some other include file.

When that is all set in `functions.php` though, the important values are often lost in a mixture of logic (what to do with those values), and boilerplate (opening and closing functions, hooking in to filters etc.), and that can make it harder for end theme authors to seek out and configure those important values to their liking.

By following a sort of *separation of concerns* principle, we use a config file to keep the important values all in one place (easy to tell people where and how to edit), and then keep the rest of the logic and boilerplate away from those who are less confident with PHP. They get a single place to make amendments, and you don't have to maintain the default logic.

Any theme can use the ThemeToolkit, and Genesis child theme can use this GenesisThemeToolkit.

For premium themes, you would set the toolkit(s) as a composer dependency, to pull it in locally for development, and then just be sure to include `vendor/gamajo/...` within your distributable theme zip.

Installation
------------

[](#installation)

Requires PHP 7.1.

In a terminal, browse to the directory with your theme in and then:

```
composer require gamajo/genesis-theme-toolkit
```

You can then autoload (PSR-4) or require the files as needed.

Usage
-----

[](#usage)

See the [example-config.php](docs/example-config.php). This would typically live in your theme, at `config/defaults.php`.

Your theme would then contain a function, in the `functions.php`, to pull in this config, and load up the individual components, which are referred to as *bricks*:

```
// functions.php

namespace Gamajo\ExampleTheme;

use BrightNucleus\Config\ConfigFactory;
use Gamajo\GenesisThemeToolkit\BreadcrumbArgs;
use Gamajo\GenesisThemeToolkit\CustomLogo;
use Gamajo\GenesisThemeToolkit\FooterCreds;
use Gamajo\GenesisThemeToolkit\Layouts;
use Gamajo\GenesisThemeToolkit\Templates;
use Gamajo\GenesisThemeToolkit\ThemeSettings;
use Gamajo\GenesisThemeToolkit\WidgetAreas;
use Gamajo\ThemeToolkit\GoogleFonts;
use Gamajo\ThemeToolkit\ImageSizes;
use Gamajo\ThemeToolkit\ThemeSupport;
use Gamajo\ThemeToolkit\ThemeToolkit;
use Gamajo\ThemeToolkit\Widgets;

add_action( 'after_setup_theme', __NAMESPACE__ . '\setup' );
/**
 * Theme setup.
 *
 * Compose the theme toolkit bricks.
 */
function setup() {
	$config_file = __DIR__ . '/config/defaults.php';
	$config = ConfigFactory::createSubConfig( $config_file, 'Gamajo\ExampleTheme' );

	// These bricks are run in admin and front-end.
	$bricks = [
		ImageSizes::class,
		Templates::class,
		ThemeSupport::class,
		Widgets::class,
		Layouts::class,
		ThemeSettings::class,
		WidgetAreas::class,
		CustomLogo::class,
	];

	// Apply logic in bricks, with configuration defined in config/defaults.php.
	ThemeToolkit::applyBricks($config, ...$bricks);

	if ( ! is_admin() ) {
		// Only front-end bricks.
		$bricks = [
			FooterCreds::class,
			BreadcrumbArgs::class,
			GoogleFonts::class,
		];

		ThemeToolkit::applyBricks($config, ...$bricks);

	}
}
```

The `'Gamajo\ExampleTheme'` string matches the two keys in the `return` at the bottom of the config file. Change this in the config and the function to be your company name and theme name.

You don't have to use all of the bricks in this package; pick and choose.

You can add your own bricks to your theme (in your `src/` or similar directory), and then make use of them in the function above.

If you're not using the Genesis Framework, see the [Theme Toolkit](https://github.com/gamajo/theme-toolkit) which has just the bricks applicable for building themes in general.

Change Log
----------

[](#change-log)

Please see [CHANGELOG.md](CHANGELOG.md).

Credits
-------

[](#credits)

Built by [Gary Jones](https://twitter.com/GaryJ)
Copyright 2017 [Gamajo](https://gamajo.com)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.4% 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 ~6 days

Total

7

Last Release

3197d ago

PHP version history (2 changes)0.1.0PHP ^7.0

0.5.0PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba7751eebec0f74a4963e9a062f49e58222b97872bf193d95f0505f3df321d09?d=identicon)[GaryJones](/maintainers/GaryJones)

---

Top Contributors

[![GaryJones](https://avatars.githubusercontent.com/u/88371?v=4)](https://github.com/GaryJones "GaryJones (28 commits)")[![craigsimps](https://avatars.githubusercontent.com/u/11818429?v=4)](https://github.com/craigsimps "craigsimps (6 commits)")

---

Tags

genesisgenesis-child-themegenesis-frameworkwordpresswordpress-theme-developmentgenesis-framework

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/gamajo-genesis-theme-toolkit/health.svg)

```
[![Health](https://phpackages.com/badges/gamajo-genesis-theme-toolkit/health.svg)](https://phpackages.com/packages/gamajo-genesis-theme-toolkit)
```

###  Alternatives

[seothemes/genesis-starter-theme

Genesis starter theme with a modern development workflow.

1441.1k](/packages/seothemes-genesis-starter-theme)[varunsridharan/wp-dependencies

Provides Function To Check if a plugin is active/inactive &amp; function to compare versions.

1032.5k1](/packages/varunsridharan-wp-dependencies)[devaloka/network-wp-query

A WordPress plugin that provides Network-wide WP Query for Multisite environment

161.3k](/packages/devaloka-network-wp-query)

PHPackages © 2026

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