WordPress的一个随机文章插件
网赚利器:关键字工具Micro Niche Finder,英文伪原创工具TheBestSpinner
网站建设:美国空间,美国主机,Godaddy域名注册-代购咨询QQ:657469451
---Ads by Tuixy
这个插件是在博客显示相关内容的,感觉不错,感觉不错,已经测试是可以用的,现在中文和英文的我都给大家介绍下,使用这个插件好处还是蛮多的:一是增加博客内容的关联性,一是方便读者看到相关内容.省的一些好文章由于时间问题而沉底,呵呵.
中文的是由 桑林志 博客提供的:
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 = ‘<li>’, $after = ‘</li>’, $show_pass_post = false, $show_excerpt_in_title = true)
$limit:显示文章数,缺省5篇;
$length:摘要长度,缺省400;
$before:每条记录前显示的文字,缺省<li>
$after:每条记录后显示的文字,缺省</li>
$show_pass_post:是(true)/否(false)显示保护了的文章,缺省否(false)
$show_excerpt_in_title:是(true),摘要显示于文章链接的title;否(false),直接显示于页面;缺省是(true)
英文的由 All Things Seen and Unseen 博客提供:
This plugin displays a list of posts chosen at random from your blog.
This is version 2.1.0 beta
which is a major rewrite of the previous versions.
Random Posts lets you put on display some of the posts that might otherwise get lost deep in your archives and, hopefully, get visitors to explore your site more thoroughly.
The plugin has an options page which lets you change how the output is generated and displayed.
Installation Instructions
- Upload the whole plugin folder (Random_Posts) to your /wp-content/plugins/ directory.
- Go to your admin Plugins page and activate Random Posts.
- Put
<?php random_posts(); ?>at the place in your theme files where you want the list of similar posts to appear. Lorelle on WordPress has a good guide to modifying themes for plugins. - Use the admin Options|Random Posts page to set all the available options. Note: You must be logged in with the capability to manage options to be able to access the admin pages–in the role of administrator (WordPress 2+) or user level 8 or above (before version 2). Alternatively, the options can be overridden by passing a parameter to the random_posts template tag.
Upgrading from Earlier Versions
- Delete the contents of the Random_Posts folder on your server.
- Upload the whole plugin folder (Random_Posts) to your /wp-content/plugins/ directory.
- This version (2.x) has been largely rewritten and in the process some options have been removed, some new ones added, and a whole new template scheme introduced to allow greater customisation of the displayed output. You will probably need to change your previous settings to get the plugin to behave in the way you wish.
Popularity: 3%











文章不错。路过此地给你踩踩·
[回复]