1 Star 4 Fork 1

gallanthunter/wp-theme-beginner

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
search.php 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
gallanthunter 提交于 2023-01-27 22:38 . 修复部分问题
<?php
/*
* @Filename : search.php
* @Description :
* @Author : Zhang Zhijun <gallanthunter@163.com>
* @Copyright : Copyright (c) 2022 by chahuawu.com, All Rights Reserved.
* @License : Mulan PubL v2
* @Link : https://chahauwu.com
* @CreateTime : 2023-01-27 22:11:05
* @LastModifyTime: 2023-01-27 22:19:06
*/
get_header();
?>
<div class="content-wrap">
<div class="content">
<?php if (!have_posts()) : ?>
<header class="archive-header">
<h1>没有找到有关【<?php echo htmlspecialchars($s); ?>】的内容</h1>
<p class="muted">给您推荐以下内容:</p>
</header>
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'showposts' => 4,
'ignore_sticky_posts' => 1,
'paged' => $paged
);
query_posts($args);
?>
<?php if (bgn_get_option('bgn_card_b')) {
include 'modules/card.php';
} else {
include 'modules/excerpt.php';
} ?>
<?php else : ?>
<header class="archive-header">
<h1>有关【<?php echo htmlspecialchars($s); ?>】的内容</h1>
</header>
<?php if (bgn_get_option('bgn_card_b')) {
include 'modules/card.php';
} else {
include 'modules/excerpt.php';
} ?>
<?php endif; ?>
</div>
</div>
<?php get_sidebar();
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

搜索帮助