一般来说,无论我们在使用Typecho或者WP的时候,标签排序都是按照系统自带的随机排序格式,有些主题可能会有一些自带的排序规则。这里老蒋整理到2个网上提供的排序方法,如果有需要在设定主题的时候指定特定的标签排序的可以参考。
1、时间排序
<?php $this->widget('Widget_Metas_Tag_Cloud')
->to($taglist); ?><?php while($taglist->next()): ?>
<li></li>
<?php endwhile; ?>
2、文章数量排序
<?php $this->widget('Widget_Metas_Tag_Cloud', array('sort' => 'count', 'ignoreZeroCount' => true, 'desc' => true, 'limit' => 20))->to($tags); ?>
<?php while($tags->next()): ?>
<li>
自定义设置Typecho标签排序的两种方法
一般来说,无论我们在使用Typecho或者WP的时候,标签排序都是按照系统自带的随机排序格式,有些主题可能会有一些自带的排序规则。这里老蒋整理到2个网上提供的排序方法,如果有需要在设定主题的时候指定特定的标签排序的可以参考。
1、时间排序
<?php $this->widget('Widget_Metas_Tag_Cloud')
->to($taglist); ?><?php while($taglist->next()): ?>
<li></li>
<?php endwhile; ?>
2、文章数量排序
<?php $this->widget('Widget_Metas_Tag_Cloud', array('sort' => 'count', 'ignoreZeroCount' => true, 'desc' => true, 'limit' => 20))->to($tags); ?>
<?php while($tags->next()): ?>
<li> 
品味女人:女人养颜不如养心
- 2022-01-22

时间都去哪儿了
- 2022-01-23

人生感悟:人生14定律
- 2022-01-22

早放心语:深情不及久伴,厚爱无需多言
- 2022-01-22
万水千山总是情,给个打赏行不行。 打赏
