I am working with wordpress 3.1 and have custom post type of whitepaper. My single-whitepaper template seems to be working. But the archive template (archive-whitepaper.php) is not.
And this after I have added the new 'has_archive' parameter to my register post type function. I have tried setting it to true and I have tried setting it to a slug of 'whitepaper'
But when I hit the url example.com/whitepaper, I get a white screen. Here's my code:
register_post_type( 'whitepaper', array( 'labels' => array( 'name' => __( 'Whitepapers' ), 'singular_name' => __( 'Whitepaper' ), 'add_new' => __( 'Add New' ), 'add_new_item' => __( 'Add New Whitepaper' ), 'edit' => __( 'Edit' ), 'edit_item' => __( 'Edit Whitepaper' ), 'new_item' => __( 'New Whitepaper' ), 'view' => __( 'View Whitepaper' ), 'view_item' => __( 'View Whitepaper' ), 'search_items' => __( 'Search Whitepapers' ), 'not_found' => __( 'No whitepapers found' ), 'not_found_in_trash' => __( 'No whitepapers found in Trash' ), 'description' => __( 'Whitepaper type is used to post recommended viewing content for our users.' ) ), 'public' => true, 'show_ui' => true, 'publicly_queryable' => true, 'exclude_from_search' => false, 'menu_position' => 5, 'menu_icon' => get_stylesheet_directory_uri() . '/images/whitepaper.png', 'query_var' => true, 'supports' => array( 'title', 'editor', 'excerpt', 'custom-fields', 'thumbnail' ), 'can_export' => true, 'has_archive' => 'whitepaper' ) ); What am I doing wrong?
