@beetrootman:
This code should work for you. Use before calling wp_get_archives on the template page. This will generate your archive links with the replacement of post type 'post' with your custom post type.
add_filter( 'getarchives_where' , 'fm_getarchives_where_filter' , 10 , 2 );
function fm_getarchives_where_filter( $where , $r ) {
$args = array( 'public' => true , '_builtin' => false );
$output = 'names'; $operator = 'and';
$post_types = get_post_types( $args , $output , $operator );
$post_types = array_merge( $post_types , array( 'post' ) );
$post_types = "'" . implode( "' , '" , $post_types ) . "'";
return str_replace( "post_type = 'post'" , "post_type = 'your_custom_post_type_name'" , $where );
}
Just replace your_custom_post_type_name above with your custom post type name and you are all set.
Regards,
Fahd Murtaza