2008.4.14  

今更wordpressにGravatarの導入。  

wp_gravatar 導入方法

・Wordpress用Gravatarプラグイン

上記のサイトから、zipファイルをダウンロード。

wp_gravatarフォルダごと、wp-content/pulginsフォルダにアップ。

プラグインの有効化を行う。

WPのバージョンによって方法が違うのかもしれませんので注意してください。

[sourcecode language=”php” wraplines=”false”]
<?php if (” != get_comment_author_url()) {
echo "<a href=’$comment->comment_author_url’ title=’Visit $comment->comment_author’>";
$gravatar_alt = $comment->comment_author."’s Gravatar";
} else {
echo "<a href=’http://www.gravatar.com’ title=’Create your own gravatar at gravatar.com!’>";
$gravatar_alt = "Gravatarに登録するとメールアドレスに応じたユニークな画像を表示できます。";
} ?>;
<img src="<;?php gravatar() ?>" alt="<?php echo $gravatar_alt; ?>" width="80" height="80" style="float:right;margin:0px 10px 2px 10px;" /></a>
[/sourcecode]

こちらにGravatarの登録方法等が載っています。すごくわかりやすいですね。

・caramel*vanilla – Gravatarリニューアル!!登録のススメ

結果は下記のURLです。

http://poccori.com/blog/wp/archives/88#comment-39

0 Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2024 Heart Beat | powered by WordPress with Barecity