サイドバーコメントの表示方法カスタマイズPlugin Get Recent Comments

以前からWordPressのデフォルトのコメント表示方法には不満があった。
デフォルトの表示内容は、[コメント投稿者名] >> [記事名] となっていて、Widgetでカスタマイズできる項目は表示件数のみ。
サイドバーをカスタマイズするPluginも一杯存在するが、しっくりきたのは、Bitte keine heisse Asche einwerfenで配布されているGet Recent CommentsというPlugin。カスタマイズ項目も豊富で、指定文字数以上の省略表示についても日本語も問題なし。
ダウンロードして、Pluginを有効化したら、Widgetの中に “Get Recent Comments” と “Get Recent Trackbacks” というのが増えているので、それを表示させたい位置に置くだけ。細かい設定は各種設定から可能。

やっと一つスッキリした。こうやってクエリが増えていってサイトも重くなっていくのか。。。
そろそろ新しいサーバに移行したいなぁ。

ダウンロードはGet Recent Comments « Extend › Pluginsから。

カスタマイズ可能な項目は以下のとおり。

%comment_excerpt The text of the comment. It might get shorted to the number of characters you entered in “Long comments are chopped off at…”
%comment_link The URL to the cited comment.
%comment_author The name, the commenter entered in the comment form. If she left the field empty, the name is “Anonymous”.
%gravatar This macro becomes a complete image tag. If the comment author registered a gravatar with gravatar.com. Example:
<img src=”http://www.gravatar.com/avatar.php”>
%gravatar_url This macro becomes only the URL to the gravatar. Example:
http://www.gravatar.com/avatar.php
%profile_picture Becomes to URL of a profile picture. Use it like this:
<img src=”%profile_picture” width=16 height=16>. This only works after activation of Hannah Gray’s Profile Pics Plugin.
%userid If the comment author is registered with your wordpress, and was logged in, when he wrote the comment this is replaced with the user id, she has in WordPress. You can do fancyful things with this macro. For example you may construct an image url, that points to pictures of all the authors of your blog: <img src=”/images/user%userid.jpg”>
   
%comment_date The date, when the comment was posted in the style you configured as default date format.
%comment_time The time, when the comment was posted
%time_since Time since the comment was posted. For example: “9 hours 16 minutes”
%author_url The URL, the comment author left in the comment form, or if the comment is a trackback, the URL of the site that issued the trackback.
%author_url_href The same like %author_url but inside a href statement.
If there is no URL, the whole macro is empty. Without a href=”” statement the link looks like a link, but
is inactive. Use it like this: <a %author_url_href title=”%comment_date”>comment_author</a>
%post_title The title of the posting that was commented.
%post_link The URL of the posting that was commented.
%post_date The date when the commented posting was published.
%trackback_title Only applicable in trackbacks: The title of the trackback. It might get shorted to the number of characters you entered in “Long trackbacks are chopped off at…”

これだけあれば困らないでしょう。

takenokoさんへ

このPluginを有効にすると、「テーマ」→「ウィジェット」の設定画面に”Get Recent Comments”ってのが出てくると思いますので、それを配置した後に、

Get Recent Comments タイトル設定

これで。あんまこのPluginに関係した話じゃないかもですが…。

コメント

  1. takenoko より:

    こんにちは。僕もこの記事を読んでGet Recent Commentsを使い始めたのですが、サイドバーに表示した時の、「RECENT COMMENTS:」という表記を、kuniさんのBlogのように「最近のコメント」という表記に変えるにはどうすればいいでしょうか?
    最近Word Pressを使い始め、CSSやPHPの勉強をしているのですが、どうも初心者すぎて、よくわかりません。
    もしよかったら教えてください。お願いします。

  2. kuni より:

    文字で説明がしづらかったので、本文にやり方書きました。
    勉強頑張って下さいね。
    WordPressは使いやすくて良いと思います。

  3. takenoko より:

    わざわざありがとうございます!
    僕の使っているテーマではwidgetsが使えなかったので、気がつかなかったみたいです。
    今設定して、使えるようになりました。
    ありがとうございました! 精進していきます。

  4. Newf より:

    こんばんは。
    このプラグイン、なぜか Comment と Trackback とで ID が重複しちゃうんですよね(get-recent-comments)。ページのソースを見るたびに、モヤモヤしてしまいます 🙁

  5. kuni より:

    コメントありがとうございます。
    うーん、まったく気がつきませんでした 🙂
    そう言われると、 Trackback のリンクをクリックしたときに、きちんとジャンプもしませんね。。
    ソース覗いてみましたが、中の処理が分かれてないので、 #ping[id] 形式のリンクを出力するのちょっと面倒そうです。むぅ。

    しかし、同じ vicuna を使っていると思えないほど見やすいページで泣きそうになりました。やっぱセンスの問題ですよね。。
    レウさんと別れちゃう的な投稿にコメントしたら、エラーっぽい画面が出ました。ぎゃふん。

  6. cwxwwwxdfvwwxwx より:

    well, hi admin adn people nice forum indeed. how’s life? hope it’s introduce branch 😉

  7. […] Get Recent Comments サイドバー等に簡単に頂いたコメントを表示できるプラグイン。Wordpressの標準機能でもコメントは表示できるが、カスタマイズがあんまりできない為、カスタマイズしたい方にはオススメのプラグインです。 【プラグイン配布先】 WordPress : Get Recent Comments ≪ WordPress Plugins 【参考サイト】 サイドバーのコメント表示プラグイン Get Recent Comments | WordPressで企業ウェブサイト作成・商用ホームページ制作 WordPress Go Go サイドバーコメントの表示方法カスタマイズPlugin Get Recent Comments – kunih… […]

  8. […] ●サイドバーカスタマイズ関連 最新のコメント取得 https://kuniharumaki.com/2007/10/08/1500/wordpress-get-recent-comments.html WordPressの標準ウィジェットだとサイドバーに表示されるコメントが blogの記事 […]

タイトルとURLをコピーしました