Typecho主题插件站
每一个作品都值得被记录

Typecho 标签列表按文章数量排序

Typecho爱好者开发日志 • 2693次浏览 • 发布 2018-05-17 • 更新 2018-05-17
极致加速的V2Ray 助您畅享全球网络 & 搬瓦工VPS最新优惠码

Typecho中自定义标签数量(就这里面的20),按照文章数量排序代码:

<?php $this->widget('Widget_Metas_Tag_Cloud', array('sort' => 'count', 'ignoreZeroCount' => true, 'desc' => true, 'limit' => 20))->to($tags); ?> 
<?php while($tags->next()): ?> 
<li><a rel="tag" href="<?php $tags->permalink(); ?>"><?php $tags->name(); ?></a></li>
<?php endwhile; ?>

注意:上面代码中limit后面的20表示输出20个标签,sort后面的count表示按照数量排序

本文检索关键词:typecho
厂商投放
添加新评论 »