Skip to content

Commit

Permalink
修复置顶文章不显示问题
Browse files Browse the repository at this point in the history
Signed-off-by: Kent Liao <2964556627@qq.com>
  • Loading branch information
liaocp666 committed Mar 7, 2023
1 parent 53ab005 commit 5b1a6b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion inc/components/middle-index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="col-lg-8 col-md-12">
<div id="middle">
<?php $this->need('inc/components/middle-header.php'); ?>
<?php if($this->is('home')): ?>
<?php if($this->is('index') && $this->_currentPage == 1): ?>
<?php $this->need('inc/components/sticky.php'); ?>
<?php endif; ?>
<div id="article" class="mb-5">
Expand Down
3 changes: 2 additions & 1 deletion inc/components/sticky.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
if ($cids = getStickyPost()): ?>
$cids = getStickyPost();
if (null != $cids): ?>
<div id="sticky">
<div class="row">
<?php foreach ($cids as $cid) : ?>
Expand Down

0 comments on commit 5b1a6b2

Please sign in to comment.