This problem is giving me a headache and I was wondering if anyone knew how to fix it.
I have a custom post type called Review. Here is how it is defined:
function codex_custom_init() {
$args = array( 'rewrite' => array('slug' => 'review'),
'public' => true,
'has_archive' => true,
'show_ui' => true,
'label' => 'Review',
'publicly_queryable' => true,
'taxonomies' => array('category', 'post_tag'),
'supports' => array( 'title', 'editor', 'comments', 'excerpt', 'custom-fields', 'thumbnail', 'author')
);
register_post_type( 'review', $args );
}
add_action( 'init', 'codex_custom_init' );
My archive page, handled by archive-review.php, works fine for pages like this
http://www.acme.com/review/page/3/
However, when categories are involved, wordpress does not display the "next" page. Instead, it goes to a 404. For example, when I try to access this:
http://www.acme.com/category/random/page/2/
Why does that give a 404? Also, it no longer is powered by archive-review.php, but archive.php (which makes sense I guess)
archive.php query stuff:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$cat = get_category(get_query_var('cat'));
$catID = $cat->term_id;
$args = (array('post_type' => array('post', 'review'), 'cat' => $catID, 'paged' => $paged));
query_posts($args);
Please help!! I am very frustrated!
http://www.acme.com/category/random/page/2/
is random a typo?