type="checkbox"(如何实现自定义调用Typecho标签的方法)
导读:我们应该知道网站的文章TAGS标签还是很有作用的,甚至有些时候标签的排名比文章都好,所以我们需要在各个页面会调用标签,增加页面的关联。这里我们整理几个常用的Typecho标签调用方法。...
我们应该知道网站的文章TAGS标签还是很有作用的 ,甚至有些时候标签的排名比文章都好 ,所以我们需要在各个页面会调用标签 ,增加页面的关联 。这里我们整理几个常用的Typecho标签调用方法 。
1 、按照文章数量排序
<?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="https://www.yuucn.com/<?php $tags->permalink(); ?>"><?php $tags->name(); ?></a></li> <?php endwhile; ?>2 、按照时间排序
<?php $this->widget(Widget_Metas_Tag_Cloud) ->to($taglist); ?><?php while($taglist->next()): ?> <li><a href="https://www.yuucn.com/<?php $taglist->permalink(); ?>" title="<?php $taglist->name(); ?>"><?php $taglist->name(); ?></a></li> <?php endwhile; ?>创心域SEO版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!