將本站安裝 WP-PostRatings 過程記錄下來
1.請至作者的網站下載 WP-PostRatings 1.3版,解壓後上傳到Plugins/目錄,在wordpress管理後台啟用即可。
2.啟用外掛後,會多出一個[Ratings]選項,有詳細的Post Ratings日誌功能,能看到每一個評分人的IP地址和評分時間等信息。相應的文字選項設置一下即可。
3.官方的教法為
在模板index.php中找到:< ?php while (have_posts()) : the_post(); ?>
在它的下面,加入:< ?php if(function_exists('the_ratings')) { the_ratings(); } ?>
即可。(也可以在single.php, post.php,search.php 或者 page.php中加入)
我不想將評分的功能加在文章的前面,所以我將評分的功能加到文章的最後
我共修改了2個檔:
1.single.php
<!--post paging-->
<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
<!--加入評分外掛-->
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
2.index.php
<!--read more-->
<?php the_content('<br />Read the rest of this entry »'); ?>
<!--加入評分外掛-->
<?php if(function_exists('the_ratings')) { the_ratings(); } ?>
以上就完成了。
Popularity: 3%

分享個人Excel VBA 學習經驗,架站心得, 日常生活記事等...











Proudly powered by
Why don't you make one?