1 Star 4 Fork 1

gallanthunter/wp-theme-beginner

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
index.php 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
gallanthunter 提交于 2023-02-19 23:02 . 修复部分显示问题
<?php
/*
* @Filename : index.php
* @Description :
* @Author : Zhang Zhijun <gallanthunter@163.com>
* @Copyright : Copyright (c) 2022 by chahuawu.com, All Rights Reserved.
* @License : Mulan PubL v2
* @Link : https://chahuawu.com
* @CreateTime : 2022-12-17 20:57:28
* @LastModifyTime: 2023-01-30 21:08:17
*/
get_header();
?>
<div class="bgn-container bgn-m-auto bgn-max-w-screen-xl bgn-flex bgn-flex-col md:bgn-flex-row bgn-leading-relaxed">
<div class="bgn-w-full md:bgn-w-8/12 bgn-mr-2">
<!-- 置顶文章 -->
<?php
// get_template_part('template-parts/article/article', 'sticky-post');
?>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'ignore_sticky_posts' => 1,
'paged' => $paged,
'orderby' => 'date'
);
query_posts($args);
while (have_posts()) {
the_post();
get_template_part('template-parts/article/article', 'list');
};
wp_reset_query();
paginate_posts();
?>
</div>
<aside class="bgn-sidebar bgn-w-full md:bgn-w-4/12">
<?php get_sidebar(); ?>
</aside>
</div>
<!-- footer -->
<?php get_footer(); ?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/gallanthunter/wp-theme-beginner.git
git@gitee.com:gallanthunter/wp-theme-beginner.git
gallanthunter
wp-theme-beginner
wp-theme-beginner
master

搜索帮助