Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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