如何修复此问题,当我访问post type的第二页时,出现错误404:
web.site/clipuri/2012/
web.site/clipuri/2012/page/2/
register_post_type(\'clip\', array( \'label\' => \'Clip\',\'description\' => \'\',\'public\' => true,\'show_ui\' => true,\'show_in_menu\' => true,\'capability_type\' => \'post\',\'hierarchical\' => true,
\'rewrite\' => array(\'slug\' => \'\'),
\'query_var\' => true,\'has_archive\' => true,
\'menu_position\' => 5,\'supports\' => array(\'title\',\'editor\',\'custom-fields\',\'category\', \'post_tag\',),
\'labels\' => array (
\'name\' => \'Clip\',
\'singular_name\' => \'Clip\',
\'menu_name\' => \'Clip\',
\'add_new\' => \'Add Clip\',
\'add_new_item\' => \'Add New Clip\',
\'edit\' => \'Edit\',
\'edit_item\' => \'Edit Clip\',
\'new_item\' => \'New Clip\',
\'view\' => \'View Clip\',
\'view_item\' => \'View Clip\',
\'search_items\' => \'Search Clipuri\',
\'not_found\' => \'No Clip Found\',
\'not_found_in_trash\' => \'No Clip Found in Trash\',
\'parent\' => \'Parent Clip\',
),) );
register_taxonomy("clipuri","clip", array("hierarchical" => true, "label" => "Cat Clip", \'show_ui\' => true, \'query_var\' => true, "singular_label" => "clipuri", "rewrite" => true, \'with_front\' => true));
在我使用的主题中:
<?php global $wp_query;
$args = array_merge( $wp_query->query, array( \'post_type\' => \'clip\') );
query_posts( $args ); ?>
<div class="nav">
<?php if(function_exists(\'wp_paginate\')) {wp_paginate();} ?>
</div>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>