This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<?php
/**
* 首页入口文件
* 处理首页和分页显示
*/
?>
<?php get_header(); ?>
// 检查是否是分页请求
$paged = get_query_var('paged') ? get_query_var('paged') : (get_query_var('page') ? get_query_var('page') : 1);
if ($paged > 1) {
// 如果是分页请求,重定向到archive.php的逻辑
// 或者直接包含archive.php的内容
include(get_template_directory() . '/archive.php');
} else {
// 首页内容
<div class="page-full-width">
<div class="row">
<div class="col-md-12">
if (have_posts()) {
while (have_posts()) {
the_post();
the_content();
}
</div>
<?php get_footer(); ?>