Skip to content

Instantly share code, notes, and snippets.

@kimwhite
Created November 11, 2015 13:06
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 kimwhite/a76f20769e04176531b8 to your computer and use it in GitHub Desktop.
Save kimwhite/a76f20769e04176531b8 to your computer and use it in GitHub Desktop.
// Our custom post type function
function create_posttype() {
register_post_type( 'members',
// CPT Options
array(
'labels' => array(
'name' => __( 'Members' ),
'singular_name' => __( 'Member' )
),
'public' => true,
'has_archive' => true,
'rewrite' => array('slug' => 'members'),
)
);
}
// Hooking up our function to theme setup
add_action( 'init', 'create_posttype' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment