I've created a custom post type and custom taxonomy (all fine so far!) but when I try to view the post it's giving me a page not found.
What do I need to do to setup a template which the custom post type below will use?
add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'members',
array(
'labels' => array(
'name' => __( 'Members' ),
'singular_name' => __( 'Members' )
),
'capability_type' => 'post',
'supports' => array('title','editor','comments'),
'public' => true,
'has_archive' => true,
'rewrite' => array( 'slug' => 'members' ),
)
);
}
function members_init() {
// create a new taxonomy
register_taxonomy(
'members',
'members',
array(
'label' => __( 'Member Categories' ),
'sort' => true,
'hierarchical' => true,
'args' => array( 'orderby' => 'term_order' ),
'rewrite' => array( 'slug' => 'members' )
)
);
}
add_action( 'init', 'members_init' );