透過 WordPress 後台新增外掛功能搜尋『WP-PostViews Plus』
目前版本雖然網站敘述說僅支援至2.X版,實際測試可使用在 3.0.4 版上
 
修改準備動作:index.php、single.php

於『index、single'找『<span><?php the_author() ?></span>
於下一行插入
<?php if(function_exists('the_views')) { the_views(次點閱); } ?>
※當然您也可以調整您想放置的位置

如果想再利用CSS去定位他,可以透過『<span>XXXXX</span>
來定義您想要放置的地方,例如:
<span><?php if(function_exists('the_views')) { the_views(次點閱); } ?></span>
 
相對的必須於『style.css』中加入這個style的定義內容
假設spancolor: rgb(255, 0, 0);">ID"中的ID我們定義為top1
 
那麼在style.css中,我們需要加入下面這段來調整他的位置
.top1
{
float: left;
line-height: 18px;
padding-left:20px;
padding-top: 1px;
}
※注意:以上CSS僅供參考,詳細仍以您當前使用的模板為主,每個板修改方式會有些許不同。

 

arrow
arrow
    全站熱搜

    咖啡 發表在 痞客邦 留言(0) 人氣()