Skip to content

Instantly share code, notes, and snippets.

@jdcauley
Last active December 19, 2015 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdcauley/5951666 to your computer and use it in GitHub Desktop.
Save jdcauley/5951666 to your computer and use it in GitHub Desktop.
Custom Post Function: All Options
function my_custom_post() {
register_post_type( 'my_custom_post',
array(
'labels' => array(
'name' => __( 'Custom Post' ),
'singular_name' => __( 'Custom_Post' )
),
'public' => true,
'has_archive' => true,
'supports' => array('title', 'editor', 'thumbnail', 'custom-fields'),
'taxonomies' => array('category'),
)
);
}
add_action( 'init', 'my_custom_post' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment