PHPackages                             seothemes/child-theme-library - 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. seothemes/child-theme-library

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

seothemes/child-theme-library
=============================

A lightweight drop-in library for extending Genesis child themes.

111721[2 issues](https://github.com/seothemes/child-theme-library/issues)PHP

Since Jul 2Pushed 7y agoCompare

[ Source](https://github.com/seothemes/child-theme-library)[ Packagist](https://packagist.org/packages/seothemes/child-theme-library)[ RSS](/packages/seothemes-child-theme-library/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (4)Used By (0)

Child Theme Library
===================

[](#child-theme-library)

![WordPress](https://camo.githubusercontent.com/1128830731ad01d4b5bb8a95307b6db23b1a27330420e83d448e8160f5780547/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f776f726470726573732d342e392e372532307465737465642d627269676874677265656e2e737667) [![License](https://camo.githubusercontent.com/26f8b6541ea045cc1dbc2267208158b5a7ebbf5cf437c4b486d80fee9386f77e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d2d322e302d2d6f722d2d6c617465722d626c75652e737667)](https://github.com/seothemes/child-theme-library/blob/master/LICENSE.md)

**Note:** This project is no longer maintained. Please use [d2/core](https://github.com/d2themes/core) instead.

A config-based composer package that provides a set of modules to extend Genesis child theme development.

Description
-----------

[](#description)

The main purpose of the Child Theme Library is to provide a shareable codebase for commercial Genesis child themes. This is achieved by using configuration-based architecture to separate the theme's reusable logic from it's configuration. Using this approach, we are able to use a single codebase which can be heavily customized by passing in different configs. This project is inspired by the [Genesis Theme Toolkit](https://github.com/gamajo/genesis-theme-toolkit) by Gary Jones, but contains additional functionality specific to commercial themes, including support for older versions of PHP. See the [Genesis Starter Theme](https://github.com/seothemes/genesis-starter-theme) as an example.

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

[](#requirements)

RequirementHow to CheckHow to InstallPHP &gt;= 5.4`php -v`[php.net](http://php.net/manual/en/install.php)WordPress &gt;= 4.8`Admin Footer`[wordpress.org](https://codex.wordpress.org/Installing_WordPress)Genesis &gt;= 2.6`Theme Page`[studiopress.com](http://www.shareasale.com/r.cfm?b=346198&u=1459023&m=28169&urllink=&afftrack=)Composer &gt;= 1.5.0`composer --version`[getcomposer.org](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx)Node &gt;= 9.10.1`node -v`[nodejs.org](https://nodejs.org/)NPM &gt;= 5.6.0`npm -v`[npm.js](https://www.npmjs.com/)Yarn &gt;= 0.2.x`yarn -v`[yarnpkg.com](https://yarnpkg.com/lang/en/docs/install/#mac-stable)Gulp CLI &gt;= 1.3.0`gulp -v`[gulp.js](https://gulpjs.com/)Gulp = 3.9.1`gulp -v`[gulp.js](https://gulpjs.com/)Installation
------------

[](#installation)

Include the package in your child theme's `composer.json` file (an example `composer.json` file can be found [here](https://github.com/seothemes/genesis-starter-theme/composer.json)).

```
composer require seothemes/child-theme-library
```

Optionally install the TGMPA composer package:

```
composer require tgmpa/tgm-plugin-activation
```

Usage
-----

[](#usage)

There are three steps to include the Child Theme Library in your project:

- Include the Composer `autoload.php` file
- Store the library as a global variable for use throughout your theme
- Initialize the child theme library

All changes to the child theme should be made via the theme configuration file. An example config can be found [here](https://github.com/seothemes/child-theme-library/blob/master/docs/example-config.php).

The following is an example of how to achieve the steps mentioned above. This code should be placed in your `functions.php` file, before any custom code is loaded:

```
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {

	require_once __DIR__ . '/vendor/autoload.php';
	$child_theme = new SEOThemes\ChildThemeLibrary\Theme();
	$child_theme->init();

}
```

Storing the Child Theme Library object as a global variable provides access to the library's public properties and methods. For example, to print the name of the theme you can do the following:

```
echo $child_theme->name;
```

Or, to use the Minify CSS helper function:

```
$css = 'body { background-color: red; }';
echo $child_theme->utilities->minify_css( $css );
```

Structure
---------

[](#structure)

The Child Theme Library follows the [PHP Package Development Standard](https://github.com/php-pds/skeleton_research) folder structure and uses [PSR-4 Autoloading](https://www.php-fig.org/psr/psr-4/).

```
./
├── docs/
│   └── example-config.php
├── src/
│   ├── Admin.php
│   ├── Attributes.php
│   ├── Customizer.php
│   ├── Defaults.php
│   ├── DemoImport.php
│   ├── Enqueue.php
│   ├── HeroSection.php
│   ├── Layout.php
│   ├── Markup.php
│   ├── Plugins.php
│   ├── Setup.php
│   ├── Shortcodes.php
│   ├── Structure.php
│   ├── Templates.php
│   ├── Theme.php
│   ├── Utilities.php
│   └── WidgetsAreas.php
├── tests/
├── .editorconfig
├── .gitattributes
├── .gitignore
├── composer.json
├── phpcs.xml
├── CHANGELOG.md
├── CONTRIBUTING.md
├── LICENSE.md
└── README.md
```

Hooks
-----

[](#hooks)

NameTypeDescription`child_theme_after_title_area`*action*Runs after the title area`child_theme_hero_section`*action*Runs during the hero section`child_theme_front_page_widgets`*action*Runs during the front page loop`child_theme_constants`*filter*Filters the array of constants`child_theme_config`*filter*Filters the path to the config`child_theme_latest_posts_title`*filter*Filters the latest posts title`child_theme_latest_posts_excerpt`*filter*Filters the latest posts excerpt`child_theme_footer_backtotop`*filter*Filters the backtotop shortcodeSupport
-------

[](#support)

Please visit  to open a new issue.

License
-------

[](#license)

This project is licensed under the GNU General Public License - see the LICENSE.md file for details.

Authors
-------

[](#authors)

- **Lee Anthony** - [SEO Themes](https://seothemes.com/)

See also the list of [contributors](https://github.com/seothemes/child-theme-library/graphs/contributors) who participated in this project.

Acknowledgments
---------------

[](#acknowledgments)

A shout out to anyone who's code was used in or provided inspiration to this project:

[Christoph Herr](https://github.com/christophherr/), [Gary Jones](https://github.com/garyjones/), [Craig Simpson](https://github.com/craigsimps/), [Tim Jensen](https://github.com/timothyjensen/), [Bill Erickson](https://github.com/billerickson/), [Sridhar Katakam](https://github.com/srikat/), [Chinmoy Paul](https://github.com/cpaul007/), [Nathan Rice](https://github.com/nathanrice/), [Brian Gardner](https://github.com/bgardner/)

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/55b9ce7d3453d6c0c149cd77f4441a19bf692d968bf58b7f3dbc3cf9450c2051?d=identicon)[seothemes](/maintainers/seothemes)

---

Top Contributors

[![seothemes](https://avatars.githubusercontent.com/u/24793388?v=4)](https://github.com/seothemes "seothemes (124 commits)")[![christophherr](https://avatars.githubusercontent.com/u/8683126?v=4)](https://github.com/christophherr "christophherr (2 commits)")

---

Tags

genesis-frameworkwordpress-library

### Embed Badge

![Health badge](/badges/seothemes-child-theme-library/health.svg)

```
[![Health](https://phpackages.com/badges/seothemes-child-theme-library/health.svg)](https://phpackages.com/packages/seothemes-child-theme-library)
```

###  Alternatives

[spatie/sun

Get information on the position of the sun

75176.2k3](/packages/spatie-sun)[kolab/calendar

Calendar plugin

3111.0k](/packages/kolab-calendar)[devgeniem/wp-safe-fast-and-clean-collection

This is a composer metapackage which includes WordPress plugins that make your site safer, faster and cleaner.

106.3k](/packages/devgeniem-wp-safe-fast-and-clean-collection)

PHPackages © 2026

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