Home > Plugin | WordPress > プラグイン Random Image Plugin for WordPress

プラグイン Random Image Plugin for WordPress

Widgetを利用してサイドバーに画像をランダムに表示しその画像へは該当記事へのリンクを貼ってくれるというもの。
ちょっとしたアクセントとして画像を表示できるので素晴らしいと思うが、当サイトの場合画像自体目を引くものではないのであまり見栄えが良くない。

開発及び配布先 »» Random Image Plugin for WordPress – Justinsomnia

表示がリスト表示になり現在のテーマでは崩れてしまったので少々修正してみた。
randomimage.php 112行目から
変更前

	function widget_randomimage() {
		print '<li>' . "\n";
		randomimage();
		print '</li>' . "\n";
	}

変更後

	function widget_randomimage() {
		print '<dd class="randomimage">' . "\n";
		randomimage();
		print '</dd>' . "\n";
	}

テーマのcssに追加

/*----------------------------------------
 Random Image
--------------------------------------- */

.randomimage{
text-align: center;
font-size: 90%;
}
.randomimage img{
border: 0px;
}

これでHtml Validatorのチェックでもエラーなく表示できた。

関連記事

Comments:0

Comment Form
Remember personal info

Trackbacks:0

Trackback URL for this entry
http://www.dxcode.com/archives/2009/0325723.php/trackback
Listed below are links to weblogs that reference
プラグイン Random Image Plugin for WordPress from おじさんの備忘録-番外編-

Home > Plugin | WordPress > プラグイン Random Image Plugin for WordPress

Search
Feeds
Meta

Return to page top