garung / custompostype
Create custom post type for wordpres
1.1
2017-05-11 15:55 UTC
Requires
- php: >5.4
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-08-30 12:30:20 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