Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm hoping someone can help me out. I asked this on Wordpress.org but figured no harm in asking here too.

I read an article about using a custom plugin to create custom post types. So I did. Activated it. It went great. This is what the code looks like.

add_action( 'init', 'datcustomtype_customtypes_cpt' );    

function datcustomtype_customtypes_cpt() {
register_post_type( 'our_team', array(
'labels' => array(
    'name' => 'Our Team',
    'singular_name' => 'Our Team',
),

'description' => 'Team Member Pages',
'public' => true,
'menu_position' => 20,

    'capability_type' => 'post',
    'hierarchical' => true,
    'has_archive' => true,
    'rewrite' => array( 'slug' => '/who-we-are/team' ), 

'supports' => array( 'title', 'editor')
));

}

The rewrite slug works great too http://www.example.com/who-we-are/team/NAME works perfectly.

But. No matter how many times I flush the permalink rules. I can't get http://www.example.com/who-we-are/team/ to display anything but a super annoying 404.

I have created archive-our_team.php and single-our_team.php and the single pages are totally customized and ready to go, but I can't even see the archive page to try and do anything.

What am I doing wrong?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.