-
-
Save tommcfarlin/4c4b9b260974ac7ab585b225337dabce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Define the basic arguments for the post type. | |
| $args = array( | |
| 'label' => 'Generic', | |
| 'labels' => array( | |
| 'name' => 'Generics', | |
| 'singular_name' => 'Generic', | |
| 'add_new_item' => 'Add New Generic', | |
| 'edit_item' => 'Edit Generic', | |
| 'new_item' => 'New Generic', | |
| 'view_item' => 'View Generic', | |
| 'search_items' => 'Search Generic', | |
| 'not_found' => 'No Generics', | |
| ), | |
| 'description' => 'A generic post type for third-party testing.', | |
| 'public' => true, | |
| 'show_ui' => true, | |
| 'supports' => array( | |
| 'title', | |
| 'editor', | |
| 'excerpt', | |
| ), | |
| ); | |
| // Now actually register the post type with WordPress. | |
| register_post_type( | |
| 'generic_post_type', | |
| $args | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment