Hi,
I have successfully managed to set up a custom post type with:
add_action( 'init', 'create_news_post_type' );
function create_news_post_type() {
register_post_type( 'news', array(
'labels' => array(
'name' => __('News'),
'singular_name' => __('Article')
),
'public' => true,
'show_ui' => true,
'rewrite' => array(
'slug' => 'news',
'with_front' => false
),
'has_archive' => true
) );
}
This code sets up my archive page at http://www.mydomain/news which displays the template page archive-news.php
Within this page i have:
<h2>news archive page</h2>
<? wp_get_post_type_archives('news', array('type' => 'monthly', 'show_post_count' => true)); ?>
<?
query_posts('post_type=news');
while (have_posts()) : the_post();
echo the_title();
endwhile;
?>
Which outputs my posts and monthly archive menu fine.
I have used the function wp_get_post_type_archives from the Custom Post Type Archives plugin which outputs ok
The issue i have is that the permalinks from the archive menu links are giving me a 404 error.
The link for February 2012 is http://www.mydomain.co.uk/book/2012/02
I cant work out what the issue is? Obviously something with my Permalink or a Custom Post Type Archives config issue.
Has anyone had a similar issue and resolved it?
Many thanks