Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin
Created May 9, 2016 19:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tommcfarlin/4c4b9b260974ac7ab585b225337dabce to your computer and use it in GitHub Desktop.
Save tommcfarlin/4c4b9b260974ac7ab585b225337dabce to your computer and use it in GitHub Desktop.
<?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