- 2009-08-21 (金) 13:03
- wordpress
wordpressプラグインでブログ内の閲覧数を表示・ランキングの表示ができるプラグインです。
ダウンロードして、解凍したものをwp-content/pluginsにアップロードし、プラグインの管理で「使用する」をクリック。
設定のPostViewsをクリックし、設定をします。
- Count Views From
- カウント対象
- Exclude Bot Views
- 検索エンジンのロボットを外すか
- Views Template
- カウント数の表示設定
- Most Viewed Template
- 人気記事ランキングの表示設定
設定したらSaveChangesをクリック。
記事の参照数を表示させるには、
<?php if(function_exists('the_views')) { the_views(); } ?>
を入れます。
人気記事リストを表示させるには、
<?php if (function_exists('get_most_viewed')): ?>
<ul>
<?php get_most_viewed(); ?>
</ul>
<?php endif; ?>
を入れます。
デフォルトでは、投稿・ページ両方の表示件数10件になっています。
投稿だけならpost ページだけならpage 両方はboth
get_least_viewed(‘both’, 10); このように書けば両方の10件表示です。
人気カテゴリを表示させるには、
<?php if (function_exists('get_most_viewed_category')): ?>
<ul>
<?php get_most_viewed_category(); ?>
</ul>
<?php endif; ?>
です。
get_most_viewed_category(1, ‘both’, 10);
このように書けば、カテゴリーid1のpost,page両方10件です。
- Newer: 手書きフォントが無料で作れる
- Older: 検索すればするほど楽天スーパーポイントが貯まるツールバー
Comments:0
Trackbacks:0
- Trackback URL for this entry
- http://www.coral-design.net/wordpress/379.html/trackback
- Listed below are links to weblogs that reference
- wordpressプラグインでブログ内の閲覧数を表示・ランキングの表示ができるプラグイン from WEB制作のメモ帳 - coral design
















