garung / custompostype
Create custom post type for wordpres
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/garung/custompostype
Requires
- php: >5.4
This package is not auto-updated.
Last update: 2025-11-09 08:27:32 UTC
README
Custom post type
Description: Create simple Custom Post Type for wordpress
Parameters:
DEMO/**
* Class handle for Product Custom Post Type
*/
class ProductCustomPost
{
public function __construct()
{
$fields = [
'posttype' => 'product',
'posttype_label' => 'Sản Phẩm',
'posttype_singular' => 'Sản Phẩm',
'posttype_slug' => 'product',
'taxonomy_type' => 'category-product',
'taxonomy_label' => 'Categories',
'taxonomy_singular' => 'Product Category',
'taxonomy_slug' => 'category-product',
];
new CustomPost($fields);
}
}
Note important: After create custom post type successful, you need update permalink by: Setting => permalink