アイキャッチ画像は便利なんですが、テンプレートに決め打ちで書くと、ページごとにレイアウトを変えたいとかそういう特に色々とめんどいですよね。 というわけで、アイキャッチ画像を記事内に挿入するためのショートコードを作りました。 ショートコードのソース 使い方 [thumbnail] というショートコードを設置すれば、その記事のアイキャッチ画像を表示します。 以下のように引数でURLを指定するとその記事のアイキャッチ画像を表示します。 IDで直接していすればいいと思われるかもしれませんが、ID調べるよりもURLのほうが手っ取り早いので。 [thumbnail http://example.com/archives/2222] あとは、このプラグインでテンプレートとして保存しておけば、右寄せとか左寄せとかCSSがききまくったややっこしいレイアウトでも、クライアントがストレス無く画像を埋め込むことが
New in WordPress 2.9: Post Thumbnail Images « Mark on WordPress を参考に、WordPress 2.9 の新機能の投稿サムネイル画像の使い方をご紹介。 基本的な使い方 まず編集画面で専用のインターフェースを使えるようにするため、テーマの functions.php ファイル内に次を追加します: add_theme_support( 'post-thumbnails' ); これで投稿と固定ページの両方の編集画面で投稿サムネイルのインターフェースが有効になりますが、もしどちらか一方だけで有効にしたいのなら次のようにします: add_theme_support( 'post-thumbnails', array( 'post' ) ); // 投稿で有効 add_theme_support( 'post-thumbnails', a
The custom image-resize script (TimThumb) created for Mimbo Pro is now available as an open-source project! It’s already being used by a handful of other theme designers and I look forward to seeing what other folks do with it. View Source Code | Live Demo Background The script was written by Tim McDaniels as a way to achieve the core functionality of phpthumb while using half the code. Ben then a
phpThumb() uses the GD library to create thumbnails from images (JPEG, PNG, GIF, BMP, etc) on the fly. The output size is configurable (can be larger or smaller than the source), and the source may be the entire image or only a portion of the original image. True color and resampling is used if GD v2.0+ is available, otherwise paletted-color and nearest-neighbour resizing is used. ImageMagick is u
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く