01月 22nd, 2006
WordPress随机文章插件
Category: WordPress, Author: Webphp.info, Popularity: 9%
cathome01介绍了6e的一个MT的随机文章插件。我觉得很有用哦。
可以让很久远以前的成谷子烂芝麻有机会出来晾晾。
我就想WordPress有没有同样的插件。搜索了一下,有的,看这儿。我把这个插件改了改:
1、改了提取excerpt摘要的方式,可适用于中文;
2、摘要可显示于文章链接的title里,或者直接在页面上,可选;
3、在文章链接的title里显示日期。
下载地址:random-posts.zip 使用方法:
1、解压缩,把random-posts.php上传至/wp-content/plugins/
2、在管理界面里激活 Random Posts for Chinese 插件
3、在模板里调用 < ?php random_posts(); ?>
4、调用方式
random_posts ($limit = 5, $length = 400, $before = ‘
显示文章数,缺省5篇; $length:摘要长度,缺省400; $before:每条记录前显示的文字,缺省
是(true)/否(false)显示保护了的文章,缺省否(false) $show_excerpt_in_title:
是(true),摘要显示于文章链接的title;否(false),直接显示于页面;缺省是(true)
Tags:random, WordPress.
评论数量(0) | Add Comments
本文网址:http://webphp.info/wordpress/wordpress-random-article/
