WordPress企业主题定制/开发/优化

分类_标签 分页显示 翻页出现404错误

首页 » WORDPRESS教程 » 分类_标签 分页显示 翻页出现404错误

在wordpress\wp-includes\classes.php里面的handle_404方法 删除&& !is_paged() 即可
function handle_404() {
global $wp_query;

if ( !is_admin() && ( 0 == count( $wp_query->posts ) ) && !is_404() && !is_robots() && !is_search() && !is_home() ) {
// Don't 404 for these queries if they matched an object.
if ( ( is_tag() || is_category() || is_tax() || is_author() ) && $wp_query->get_queried_object() && !is_paged() ) {
if ( !is_404() )
status_header( 200 );
return;
}
$wp_query->set_404();
status_header( 404 );
nocache_headers();
} elseif ( !is_404() ) {
status_header( 200 );
}
}

相关项目

  • WordPress外贸企业主题

  • 最近更新

  • 热门标签