WP-PostRatings是一个由Lester ‘GaMerZ’ Chan制作的文章评级插件,可以在 这里 下载这个插件。下面给大家介绍下这个插件的使用:
1,安装
在这里 这里 下载,将其中postratings文件夹解压倒wp-content/plugins目录下, 再 启用 此插件,即安装玩了。(这些用过wordpress的都知道)
2,使用
- 一般使用:
打开主题里的(即目录wp-content/themes/<YOUR-THEME-NAME>/)的
| index.php | 首页每篇文章显示 |
| single.php | 单篇文章中显示 |
| page.php | 每个页面中显示 |
| post.php | 一般比较少,在贴出的文章中显示 |
中,找到
| <?php while (have_posts()) : the_post(); ?> |
在这段代码下面任意地方(你想将 文章评级插件 放的地方),下面加入
| <?php if(function_exists(‘the_ratings’)) { the_ratings(); } ?> |
这段代码
*#我是在index.php和single.php下加入了的代码,具体如下:
| <?php the_content(‘Continue reading »’); ?> |
| <?php if(function_exists(‘the_ratings’)) { the_ratings(); } ?>我来投一票 |
上面那行是首页显示文章内容的,下面那行是添加上去的 文章评级插件 的代码,我在后头加上的中文字是让它在PostRatings下面一起显示,懂些Html/Css,php语言的都能看懂。
效果在我页面上可以看出来(可以将第二行内容改为 <?php if(function_exists(‘the_ratings’)) { the_ratings(); } ?>我来投一票<br> <br>,即在我来投一票下面加入一空白行,这样可以获得更好的显示效果)
如果不再所有文章中显示 文章评级插件 ,请勿使用以上方法 ,只要在写的文章中或页面里写入
即可,插件将只在此文章或页面中显示。
- 高级使用
1,显示 评价最高的文章
| <?php if (function_exists(‘get_highest_rated’)): ?> <ul> <?php get_highest_rated(); ?> </ul> <?php endif; ?> |
默认是第三行 <?php get_highest_rated(‘both’, 10);?>
其中值"both"是显示评价最高的文章和页面,值"10"是显示显示的数量,可自己更改;
改为"post"就只显示评价最高的文章;
改为"page"就只显示评价最高的页面;
2,显示 分类中评价最高的文章
| <?php if (function_exists(‘get_highest_rated_category’)): ?> <ul> <?php get_highest_rated_category(); ?> </ul> <?php endif; ?> |
默认是第三行<?php get_highest_rated_category(0, ‘both’, 10);?>
其中值"0”是要显示的分类的ID(管理分类中可以查到),
值"both"和值"10"和上面的一样的,我就不罗嗦了
3,显示 投票最多的文章
| <?php if (function_exists(‘get_most_rated’)): ?> <ul> <?php get_most_rated(); ?> </ul> <?php endif; ?> |
默认是第三行<?php get_most_rated(‘both’, 10);?>
其中值"both"和值"10"和上面的一样的,我就不罗嗦了
更多Lester ‘GaMerZ’ Chan的插件WP-UserOnline,WP-Sticky等…
详情访问 这里





















写的不错
回复该留言
urethral jewelry
troubleshooting snow blowers electric start
pictures of lisaraye with layered hair
louie vaton outlet stores
www walmartmybenefit com
nt12se furnace
is jeremy shockey married
www nick brainsurge game freeonline com
www mysearsrebate com
mujeres mamando pitos
ciao bella walkthrough cheats
www pygmygoatsale bucks com
husky power washer model hu80709
enzytesample com
enfield no1 mk4 t
rachel riley pussy picture
bob hair big tit pics
lolitas lsmagazine
disney com zeke luther
snowlower trouble shooting
回复该留言
kappa alpha psi shield meaning
amelia airheart final journey
angel melaku pussy
jagswimsuits com
ballistic tables for 50 bmg
rohm gmrh sontheim pistol
the kite runner spark notes
best hair styler in louisville
sedap sekejap
cobray mod d
iveco vin decoder
dr seuss writing activities for kindergarten
light colored stools
fuck you in spanish words
ohio stna license verification
winchester serial search
megan kelly fox news
nacked women in bed
rheem rguh
edgy curly cuts
回复该留言
为什么没有演示那
回复该留言
插件还是不错的
回复该留言
文龙心 回复说:
十月 23rd, 2008 at 1:03 下午
@文龙心, 我看看
回复该留言
看下效果
回复该留言