Another Pagnation custom posttype 404 page 2 error. Please help.
-
I’ve have read and tried implementing several different solutions to this problem.
I have a custom post type setup as follows:
register_post_type( ‘howWeWork’,
array(
‘label’ => __(‘How We Work’),
‘singular_label’ => __(‘How We Work Item’, ‘theme1438’),
‘_builtin’ => false,
‘public’ => true,
‘show_ui’ => true,
‘show_in_nav_menus’ => true,
‘hierarchical’ => true,
‘capability_type’ => ‘page’,
‘menu_icon’ => get_template_directory_uri() . ‘/includes/images/icon_portfolio.png’,
‘rewrite’ => array(
‘slug’ => ‘how-we-work’,
‘with_front’ => FALSE,
),
‘supports’ => array(
‘title’,
‘editor’,
‘thumbnail’,
‘excerpt’,
‘custom-fields’,
‘comments’)
)
);
register_taxonomy(‘howWeWork_category’, ‘howWeWork’, array(‘hierarchical’ => true, ‘label’ => ‘HowWeWork Categories’, ‘singular_name’ => ‘Category’, “rewrite” => true, “query_var” => true));
}
add_action(‘init’, ‘my_post_type_howWeWork’);And my query as such:
<?php $wp_query->query(“post_type=howWeWork&”. $catinclude .”&paged=”.$paged.’&showposts=12′); ?>
When it tries to load page 2 in url/how-we-work/page/2 I get the 404 error.
My permalink is setup as this:
/%catagory%/%postname%/
Thoughts? Right now I have removed the showposts=12 and set the default in WordPress to 99. But that will only last so long.
Thank you for looking.
- The topic ‘Another Pagnation custom posttype 404 page 2 error. Please help.’ is closed to new replies.