Skip to content

Instantly share code, notes, and snippets.

@braddalton

braddalton/functions.php Secret

Last active Dec 30, 2015
Embed
What would you like to do?
//* 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
You can’t perform that action at this time.