- Cha’s Bar 2.0 - http://www.nakui.biz -

コメントとトラックバックがあったエントリーを別々にリスト:commented entry list

Posted By Cha On 2007年06月13日 @ 7:07 pm In WP Plugins | No Comments

デザイン的には、まだまだ修正しなければならない事項が多いこのサイトですが、やっと最近になって、コメントやトラックバックがあったエントリー(投稿記事)をサイドバーにリストするための plugin を導入しました。plugin は、[1] 「Hirobee’s Trail [Memorandum]::Commented entry list」で、もともと WordPress 1.5.1 用にリリースされたようですが、最新版(現在、WordPress 2.2)でも充分機能します。

ちょっとリストの表記の仕方に関する詳細がないのですが、通常の plugin のようにアップロードしてから有効化して下記のコードをリスト表示したい箇所に挿入します。

コメントがあったエントリーリストを表記する場合:

<?php get_recently_commented(10); ?>

トラックバックがあったエントリーリストを表記する場合:

<?php get_recently_trackbacked(10); ?>

上記の () 内の数値は、デフォルトで 10 ですから、数値を定義しなくても機能しますが、とりあえず自分の覚書として定義をしておきました。

更に、上記の Commented Entries と Trackbacked Entries に関して、リストをツリー化して表示する Make-Tree plugin も適用しました。方法は、Make Tree のディレクトリー内の treehandler.js の最後の部分に下記のようなコードを挿入しました。

function treeMaker() {
tree(’Commented Entries’);
tree(’Trackbacked Entries’);
tree(’ページ’, ‘Page’);
tree(’カテゴリー’, ‘Categories’);

上記は、ページリストとカテゴリーリストに関してもツリー表示することが出来ます。


Article printed from Cha’s Bar 2.0: http://www.nakui.biz

URL to article: http://www.nakui.biz/index.php/2007/06/13/46

URLs in this post:
[1] 「Hirobee’s Trail [Memorandum]::Commented entry list」: http://hirobee.jp/archives/2005/05/commented-entry-list-11/

Copyright © 2006-2008 Cha's Bar 2.0. All rights reserved.