PHPackages                             builtnorth/wp-post-types - 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. builtnorth/wp-post-types

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

builtnorth/wp-post-types
========================

Constructor classes to easily register post types and related functions in a theme or plugin

v0.1.0(1y ago)156GPL-2.0-or-laterPHPPHP &gt;=8.1

Since Aug 3Pushed 1y agoCompare

[ Source](https://github.com/builtnorth/wp-post-types)[ Packagist](https://packagist.org/packages/builtnorth/wp-post-types)[ RSS](/packages/builtnorth-wp-post-types/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

WordPress Post Type Manager
===========================

[](#wordpress-post-type-manager)

Composer package for WordPress with a utility class that simplifies the process of creating and managing custom post types with extended functionality. It provides an easy-to-use interface for setting up custom post types, taxonomies, meta fields, and admin columns.

Features
--------

[](#features)

- **Custom Post Type Creation**: Easily create custom post types with a wide range of configurable options.
- **Custom Taxonomy Support**: Add custom taxonomies to your post types.
- **Custom Meta Fields**: Define and manage custom meta fields for your post types.
- **Admin Columns**: Customize the columns displayed in the WordPress admin area for your post types.
- **Featured Image Column**: Optionally display a featured image column in the admin list view.
- **Custom Title Placeholder**: Set a custom placeholder text for the title field.
- **Pagination Control**: Set custom pagination for archive pages of your post type.
- **Legacy Meta Box Removal**: Option to remove the default custom fields meta box. This is useful for the specific Gutenberg use case where `custom-field` support is needed for post meta, but you also want to hide the custom fields ftom the post editor.

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

[](#requirements)

- PHP &gt;= 8.1
- WordPress &gt;= 6.4

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

[](#installation)

This library is meant to be dropped into a theme or plugin via composer: `composer require builtnorth/wp-post-types`

Basic Setup
-----------

[](#basic-setup)

To use PostTypeManager, you need to instantiate the class and call its `init()` method. The way you do this can vary depending on whether you're using it in a theme or a plugin. It is worth noting that if there is a case where the PostTypeManager finds a config file in a plugin and the theme, the theme will override all settings in the plugins config file.

### Theme Usage

[](#theme-usage)

When used in a theme, PostTypeManager will automatically look for a `post-type.config.json` file in your theme directory. Here's how to set it up:

```
use BuiltNorth\PostTypesConstructor\PostTypeManager;

add_action('init', function() {
    $post_type_manager = new PostTypeManager();
    $post_type_manager->init();
}, 0);
```

This code should be placed in your theme's `functions.php` file or a custom plugin file that's loaded by your theme.

### Plugin Usage

[](#plugin-usage)

When using PostTypeManager in a plugin, you'll typically want to specify the path to your configuration file explicitly. Here's how to do that:

```
use BuiltNorth\PostTypesConstructor\PostTypeManager;

add_action('init', function() {
    $config_file = plugin_dir_path(__FILE__) . 'post-type.config.json';
    $post_type_manager = new PostTypeManager($config_file);
    $post_type_manager->init();
}, 0);
```

This code should be placed in your plugin's main PHP file or in a separate file that's included by your plugin.

### Custom Configuration Path

[](#custom-configuration-path)

You can specify a custom path for your configuration file, regardless of whether you're using a theme or a plugin:

```
$config_file = '/path/to/your/custom-config.json';
$post_type_manager = new PostTypeManager($config_file);
$post_type_manager->init();
```

### Using PHP Array Configuration

[](#using-php-array-configuration)

If you prefer to use a PHP array for configuration instead of a JSON file, you can do so like this:

```
$config = [
    'post_types' => [
        // Your post type configurations
    ],
    // Other configurations
];

$post_type_manager = new PostTypeManager($config);
$post_type_manager->init();
```

Best Practices
--------------

[](#best-practices)

1. Always hook into the `init` action when registering post types and taxonomies.
2. Use a priority of 0 or a low number to ensure your registrations happen early.
3. In a plugin, always use an absolute path when specifying the configuration file location.
4. Consider using a constant for the configuration file path to make it easy to change across your plugin.

By following these initialization methods, you can effectively use PostTypeManager in both theme and plugin contexts, providing flexibility in how and where you manage your custom post type configurations.

Disclaimer
----------

[](#disclaimer)

This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.

Use of this library is at your own risk. The authors and contributors of this project are not responsible for any damage to your website or any loss of data that may result from the use of this library.

While we strive to keep this library up-to-date and secure, we make no guarantees about its performance, reliability, or suitability for any particular purpose. Users are advised to thoroughly test the library in a safe environment before deploying it to a live site.

By using this library, you acknowledge that you have read this disclaimer and agree to its terms.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

653d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ea760d2fc869dfda680e0bd6dce422606e91d6a1687938a8ebc38a0c29ca343?d=identicon)[dannorthern](/maintainers/dannorthern)

---

Top Contributors

[![dannorthern](https://avatars.githubusercontent.com/u/157666970?v=4)](https://github.com/dannorthern "dannorthern (25 commits)")

---

Tags

composercomposer-librarycomposer-packagecptcustom-post-typeswordpress

### Embed Badge

![Health badge](/badges/builtnorth-wp-post-types/health.svg)

```
[![Health](https://phpackages.com/badges/builtnorth-wp-post-types/health.svg)](https://phpackages.com/packages/builtnorth-wp-post-types)
```

###  Alternatives

[synergy/synergydatagrid

Module to display data in grid using the jqGrid javascript plugin

202.0k1](/packages/synergy-synergydatagrid)

PHPackages © 2026

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