Wow! after a long and active developing WordPress themes and plugins. I would like to introduce you to my second ever plugin Backdrop Post Types. Mainly because, I always wanted to come out with a custom post type that doesn’t involve having to figure out certain things when working with other plugins that aren’t meant to be yours to control.
Backdrop Post Types is a pure PHP development, no custom css or anything that. I believe that it should be done as part of a theme rather than having to rely on a custom css and sometimes performance is the key. By default, a post type has been generated ( Portfolio ) which you can easily disable if you wish to do so and register a new custom post type.
Register a New Custom Post Type
If you need a new custom post type registered, for example, you want a post type of docs, the easiest way to achieve is to create a new post type as follow. You can create any where you want but preferably in the functions.php.
$docs = new Benlumia007\BackdropPostTypes\Register\PostType('docs');
$docs->create_post_type('docs', 'Doc', 'Docs');
Disable the default Portfolio Post Type
Sometimes using the portoflio post type is great but if you want to make your own post type such as themes or plugins, you can simiply register those and disable the default post type as follow.
add_filter( ‘backdrop_post_types_override_portfolio’, ‘__return_true’ );