PHPackages                             brightnucleus/custom-content - 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. brightnucleus/custom-content

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

brightnucleus/custom-content
============================

Config-driven WordPress Custom Content Definitions (Custom Post Types, Custom Taxonomies).

v0.2.0(10mo ago)1016.6k↓35.7%1MITPHPCI failing

Since Aug 11Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/brightnucleus/custom-content)[ Packagist](https://packagist.org/packages/brightnucleus/custom-content)[ RSS](/packages/brightnucleus-custom-content/feed)WikiDiscussions master Synced 2d ago

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

Bright Nucleus Custom Content
=============================

[](#bright-nucleus-custom-content)

[![Latest Stable Version](https://camo.githubusercontent.com/61d7a63e544b789ab758307f4f3e3afd04e8ef6e1c3d6ba45ac2a81cac847d2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6272696768746e75636c6575732f637573746f6d2d636f6e74656e742e737667)](https://packagist.org/packages/brightnucleus/custom-content)[![Total Downloads](https://camo.githubusercontent.com/6051834c51ab417208d27a78a38a5de55b2a5ceb9e16e72fb48065af8b510dfe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6272696768746e75636c6575732f637573746f6d2d636f6e74656e742e737667)](https://packagist.org/packages/brightnucleus/custom-content)[![Latest Unstable Version](https://camo.githubusercontent.com/4b36dddada05fbf82056a982e3accb710f525de98421aff33ab97b07fb31fde9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f6272696768746e75636c6575732f637573746f6d2d636f6e74656e742e737667)](https://packagist.org/packages/brightnucleus/custom-content)[![License](https://camo.githubusercontent.com/08ace0eb44ec55067f72bca7be1960e4287b849b71f57a10dc92519b31d1f988/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6272696768746e75636c6575732f637573746f6d2d636f6e74656e742e737667)](https://packagist.org/packages/brightnucleus/custom-content)

Config-driven WordPress Custom Content Definitions (Custom Post Types, Custom Taxonomies).

Table Of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Basic Usage](#basic-usage)
    - [Registering A New Custom Post Type](#registering-a-new-custom-post-type)
    - [Registering A New Custom Taxonomy](#registering-a-new-custom-taxonomy)
    - [Registering Several Custom Content Elements At Once](#registering-several-custom-content-elements-at-once)
    - [About Rewrite Rules](#about-rewrite-rules)
- [Contributing](#contributing)
- [License](#license)

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

[](#installation)

The best way to use this package is through Composer:

```
composer require brightnucleus/custom-content
```

Basic Usage
-----------

[](#basic-usage)

### Registering A New Custom Post Type

[](#registering-a-new-custom-post-type)

To register a new custom post type, you need to define it within a Config file. Default values can be found within `config/defaults.php` configuration. You then instantiate the `CustomPostType` class by injecting your Config into its constructor, and call its `register()` method.

**Example:**

```
