Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active December 30, 2015 23:49
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 braddalton/e219bb7f26a69a1b9caf to your computer and use it in GitHub Desktop.
Save braddalton/e219bb7f26a69a1b9caf to your computer and use it in GitHub Desktop.
//* Create Custom Post Type
add_action( 'init', 'add_custom_post_type' );
function add_custom_post_type() {
register_post_type( 'members',
array(
'labels' => array(
'name' => __( 'Members', 'wpsites' ),
'singular_name' => __( 'Member', 'wpsites' ),
),
'has_archive' => true,
'hierarchical' => true,
'menu_icon' => 'dashicons-admin-users',
'public' => true,
'rewrite' => array( 'slug' => 'members', 'with_front' => false ),
'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'revisions', 'page-attributes' ),
'taxonomies' => array( 'member-type' ),
'menu_position' => 2,
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment