wpessential / wpessential-postypes
WPEssential Postypes helping in registry of custom post types and taxonomies in WordPress.
Installs: 18
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/wpessential/wpessential-postypes
Requires
- php: >=7.4
- wpessential/wpessential-commons: ^1.0.8
README
Help to register the custom post types and taxonomies in WordPress.
composer require wpessential/wpessential-postypes
Add the post type to WordPress registry
$name = 'YOUR_POST_TYPE_NAME'; $cpt = \WPEssential\Library\Cpt::make($name); $cpt->register();
Remove the post type from WordPress registry
$name = 'YOUR_POST_TYPE_NAME'; $cpt = \WPEssential\Library\Cpt::make($name); $cpt->remove();
Add the taxonomy to WordPress registry
$post_type = 'YOUR_POST_TYPE_SLUG'; $name = 'YOUR_TAXONOMY_NAME'; $ctxm = \WPEssential\Library\Ctxm::make($post_type, $name); $ctxm->register();
Remove the taxonomy from WordPress registry
$post_type = 'YOUR_POST_TYPE_SLUG'; $name = 'YOUR_TAXONOMY_NAME'; $ctxm = \WPEssential\Library\Ctxm::make($post_type, $name); $ctxm->remove();