Custom Post Type Generator

Generate CPT code for your WordPress website

Key name (lowercase, 20 chars max) e.g. 'albums'
For example: 'Albums'
For example: 'Album'
Translation string (Text domain);
Menu name
Admin bar name
Archives
Attributes
Parent item
All items
Add new item
Add new
New item
Edit item
Update item
View item
View items
Search item
Not found
Not found in trash
Featured image
Set featured image
Remove featured image
Use as featured image
Insert into item
Uploaded to this item
Items list
Items list navigation
Filter item list
Hide from searchMake CPT exportableEnable CPT archivesShow CPT in Dashboard
Sidebar Icon (Dashicons)
Show in Admin Bar
Show in Navigation MenusHierarchicalPublicly QueryableShow CPT in Dashboard SidebarHide from search
Set user capabilitiesCapability types
Add CPT to REST API routes

AUTO GENERATED CODE

Please fill in required fields

How to use this code?

  1. Copy auto generated code ↑ (without beginning and ending PHP tags <?php and ?>)
  2. Paste code to bottom of your theme functions.php file
  3. Save and you are done!