PHPackages                             wordpress-phoenix/abstract-theme-base - 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. wordpress-phoenix/abstract-theme-base

ActiveLibrary

wordpress-phoenix/abstract-theme-base
=====================================

PHP class to extend when building a WordPress theme allowing you to follow smart theme setup standards.

1.0.0(6y ago)04[1 issues](https://github.com/WordPress-Phoenix/abstract-theme-base/issues)GPL-3.0-or-laterPHP

Since Mar 6Pushed 6y agoCompare

[ Source](https://github.com/WordPress-Phoenix/abstract-theme-base)[ Packagist](https://packagist.org/packages/wordpress-phoenix/abstract-theme-base)[ Docs](https://github.com/WordPress-Phoenix/abstract-theme-base)[ RSS](/packages/wordpress-phoenix-abstract-theme-base/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Abtract Theme Base
==================

[](#abtract-theme-base)

Used as a base class to help standardize the way we build WordPress themes.

CircleCI Build: [![CircleCI](https://camo.githubusercontent.com/7fccbe17d274639d54e7b0c194a59e4ca1e395359a6e09de0bb73ef3ec428757/68747470733a2f2f636972636c6563692e636f6d2f67682f576f726450726573732d50686f656e69782f61627374726163742d7468656d652d626173652e7376673f7374796c653d737667)](https://circleci.com/gh/WordPress-Phoenix/abstract-theme-base)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)

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

[](#installation)

You can use this library to start a new theme from scratch, or you can enhance your existing themes with this library. Once you have read over the installation instructions it should make sense which direction to go.

### Composer style (recommended)

[](#composer-style-recommended)

1. Confirm that composer is installed in your development environment using `which composer`. If CLI does not print any path, you need to [install Composer](https://getcomposer.org/download/).
2. Set CLI working directory to wp-content/themes/{your-theme-name}
3. Install Abstract\_Theme class via composer command line like ```
    composer require wordpress-phoenix/abstract-theme-base
    ```
4. Look at sample code below to see how to include this library in your theme.

### Manual Installation

[](#manual-installation)

1. Download the most updated copy of this repository from `https://api.github.com/repos/WordPress-Phoenix/abstract-theme-base/zipball`
2. Extract the zip file, and copy the PHP file into your theme project.
3. Include the file in your theme.

Usage
-----

[](#usage)

### Why should you use this library when building your theme?

[](#why-should-you-use-this-library-when-building-your-theme)

By building your theme using OOP principals, and extending this Theme\_Base class object, you will be able to quickly and efficiently build your theme, allowing it to be simple to start, but giving it the ability to grow complex without changing its architecture.

Immediate features include:

- Built in SPL Autoload for your includes folder, should you follow WordPress codex naming standards for class files.
- Template class provides you all the best practices for standard theme initialization
- Minimizes code needed / maintenance of your main theme file.
- Assists developers new to WordPress theme development in file / folder architecture.
- By starting all your themes with the same architecture, we create a standard that is better for the dev community.

### Simplest example of the main theme functions file, and required theme class file

[](#simplest-example-of-the-main-theme-functions-file-and-required-theme-class-file)

`custom-my-theme.php`:

```
