Skip to content

Instantly share code, notes, and snippets.

@jdcauley jdcauley/WP Custom Posts
Last active Dec 19, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.