Post Types

For custom post types we recommend looking at Extended CPTs by John Blackbourn. The package provides extended functionality to WordPress custom post types, allowing developers to quickly build post types without having to write the same code again and again.

Installation

Require the mail package, with Composer, in the root directory of your project.

$ composer require johnbillion/extended-cpts

Then require the plugin in your functions.php file. You may use WordPlate’s base_path helper function.

require base_path('vendor/johnbillion/extended-cpts/extended-cpts.php');

Now you can register new custom post types with the register_extended_post_type helper function.

register_extended_post_type('event');

Visit the documentation to read more about the plugin.