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

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

carawebs/wp-custom-content
==========================

A Wordpress plugin that generates custom post types and taxonomies from a config file.

1.0.2(9y ago)134MITPHPPHP ^7.0

Since Feb 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Carawebs/wp-custom-content)[ Packagist](https://packagist.org/packages/carawebs/wp-custom-content)[ RSS](/packages/carawebs-wp-custom-content/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (10)Used By (0)

WP CPT
======

[](#wp-cpt)

A WordPress plugin which registers:

- Custom post types
- Custom taxonomies

If you want to use this as a Composer package, rather than as a WordPress plugin, use the `dev-library` branch:

```
// composer.json for project
"carawebs/wp-custom-content": "dev-library"
```

I don't recommend this - the `dev-library` is a bit of an experiment in de-coupling custom post type registration from themes and plugins and is probably a step too far. CPT registration is probably best managed in either a plugin or mu-plugin). That branch does have quite an interesting method of loading, and a fluent interface to set the config file location.

Usage
-----

[](#usage)

This plugin is designed for use with [Bedrock](https://roots.io/bedrock/). Bedrock has an improved project structure compared to regular WordPress installations.

The plugin is intended as an aid for developers - there is no settings GUI.

Instead, a configuration file which returns a PHP array is used to register custom post types and taxonomies. This means you can easily define custom post types and taxonomies for your project by simply amending an array.

Config Files
------------

[](#config-files)

Sample config files are provided in the `/sample-config` directory.

By default, the plugin looks for config files in the `config` directory. You could amend this - which is outside the document root for the project. If you're using a regular WordPress installation, you may need to fork this plugin and modify the path to the config files:

```
