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.
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.
Now you can register new custom post types with the
register_extended_post_type helper function.
Visit the documentation to read more about the plugin.