I'm trying to create an archive for a custom post type. My custom post type is called
journal and I'm running WordPress 3.3.1. My understanding is that from WordPress 3.1 this should be an included feature so navigating to
www.mywebsite.com/journal/2013 should simply return a collection of posts from 2013 using the
archive-journal.php template. My issue is this doesn't work. I have posts from 2013 but going to that link simply returns a 404.
www.mywebsite.com/journal/ works fine but trying to add any date filter to the end of the url with cause 404s. This is the code I'm using to register the post type. I haven't included the
$labels array in below but it's in my
$journal_args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'query_var' => true, 'rewrite' => array('slug' => 'journal', 'with_front' => true), 'has_archive' => true, 'capability_type' => 'post', 'hierarchical' => false, 'menu_position' => null, 'supports' => array('title','editor','thumbnail', 'comments'), ); register_post_type( 'journal' , $journal_args );
Have I missed anything? Has anyone got any idea why the date archives are not working?