分页: 1 / 1

为了在分类列表中显示隐藏的文章,修改下面哪个文件呢?

发表于 : 2015年 12月 28日 17:53
sincway
我想把隐藏的文章只在首页被隐藏,而在具体的 Tag、分类页面还是可以看到。通过 grep 查询

代码: 全选

->where('table.contents.status = ?', 'publish')
语句,发现下面的文件包含了此语句:

代码: 全选

var/Widget/Contents/Post/Date.php:        ->where('table.contents.status = ?', 'publish')
var/Widget/Contents/Post/Recent.php:        ->where('table.contents.status = ?', 'publish')
var/Widget/Contents/Page/List.php:        ->where('table.contents.status = ?', 'publish')
var/Widget/Contents/Related.php:            ->where('table.contents.status = ?', 'publish')
var/Widget/Contents/Related/Author.php:            ->where('table.contents.status = ?', 'publish')
var/Widget/Archive.php:                    $select = $this->select()->where('table.contents.status = ?', 'publish');
var/Widget/Archive.php:            ->where('table.contents.status = ?', 'publish')
var/Widget/Archive.php:            ->where('table.contents.status = ?', 'publish')


然而逐个将上面的语句修改为

代码: 全选

->where('table.contents.status IN (?, ?)', 'publish', 'hidden')
之后,隐藏的文章仍然未被输出。

是没改对地方吗?还是由于其他原因造成隐藏的文章被拦截了呢?改了好久也不成功,对 Typecho 结构不太熟悉,希望能在这里得到指点 :mrgreen:

Re: 为了在分类列表中显示隐藏的文章,修改下面哪个文件呢?

发表于 : 2016年 1月 25日 15:29
hnoor0033
the hidden article has still not been output. Is no change of place? Or due to other causes hidden article was blocked out?


_______________
Download and Play dragon prince season 4 free on Mobile

Re: 为了在分类列表中显示隐藏的文章,修改下面哪个文件呢?

发表于 : 2016年 1月 25日 19:00
ClayMore
hnoor0033 写了:the hidden article has still not been output. Is no change of place? Or due to other causes hidden article was blocked out?


_______________
NOOR

woreirsis Rosette Bravo maya112<-your ID?


__________________

新版阿里百秀Alibaixiu主题 v11.1 For Typecho
http://xiu.160.me/

Re: 为了在分类列表中显示隐藏的文章,修改下面哪个文件呢?

发表于 : 2016年 3月 10日 17:53
doncheto
xxx

Re: 为了在分类列表中显示隐藏的文章,修改下面哪个文件呢?

发表于 : 2016年 4月 5日 18:38
Servio
:roll:

Re: 为了在分类列表中显示隐藏的文章,修改下面哪个文件呢?

发表于 : 2020年 8月 31日 16:19
JessWalker
Thanks for sharing!