8 月 19

Random Image は以前紹介したWordpress向けプラグインで、トップページなどに投稿内画像のサムネイルを表示できます。

今回は、実際に2列ずつで画像を表示する場合の設定例を記述します。

まずはプラグインを有効化し、「設定」→「Random Image」と進みます。

今回の設定項目は3つ。

1.HTML Template
  → %2
(画像のみを表示する場合)

2.Optional attributes for <img> tags
 → style=”width:130px;float:left;”
(画像の横幅を130pxに統一、これで回り込みできます。)

3.HTML between Images
 →なし

上記で設定可能です。

これでsidebar.phpなどに<?php randomimage();?>を記述しましょう。

場合によってはこの記述の後に回り込み解除<br clear=”all”>等を忘れないでください。

このページも参考になります。

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

© PHPress since 2008