- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
「テンプレートタグ/the post thumbnail」の版間の差分
提供: WordPress Codex 日本語版
< テンプレートタグ
(en:Template Tags/the_post_thumbnail 00:35, 2 January 2010 Ramiy 版を翻訳用にコピー) |
細 (様式等微調整、未翻訳) |
||
1行目: | 1行目: | ||
+ | {{NeedTrans}} | ||
== Description == | == Description == | ||
5行目: | 6行目: | ||
== Usage == | == Usage == | ||
− | + | <?php the_post_thumbnail( $size, $attr ); ?> | |
+ | <div id="Parameters"> | ||
== Parameters == | == Parameters == | ||
+ | </div> | ||
− | + | ; size | |
− | + | : (''int'') (Optional) Image size. Default: 'thumbnail' <!-- 初期値は post-thumbnail かも? --> | |
+ | ; attr | ||
+ | : (''int'') (Optional) | ||
+ | <div id="Examples"> | ||
== Examples == | == Examples == | ||
+ | </div> | ||
=== Default Usage === | === Default Usage === | ||
19行目: | 26行目: | ||
<?php the_content(); ?> | <?php the_content(); ?> | ||
+ | <div id="More_Options"> | ||
=== More Options === | === More Options === | ||
+ | </div> | ||
the_post_thumbnail(); // without parameter -> Thumbnail | the_post_thumbnail(); // without parameter -> Thumbnail | ||
29行目: | 38行目: | ||
the_post_thumbnail( array(100,100) ); // Othe resolutions | the_post_thumbnail( array(100,100) ); // Othe resolutions | ||
+ | <div id="Notes"> | ||
== Notes == | == Notes == | ||
+ | </div> | ||
− | To enable post thumbnails, the current theme must include <code>add_theme_support( 'post-thumbnails' );</code> in its <tt>functions.php</tt> file. | + | To enable post thumbnails, the current theme must include <code>add_theme_support( 'post-thumbnails' );</code> in its <tt>functions.php</tt> file. 詳しくは [[Post Thumbnails]]/[[:en:Post Thumbnails|en]] を参照のこと。 |
− | == | + | == Changelog == |
Since: 2.9.0 | Since: 2.9.0 | ||
39行目: | 50行目: | ||
== Source File == | == Source File == | ||
− | <tt>the_post_thumbnail()</tt> is located in {{ | + | <tt>the_post_thumbnail()</tt> is located in {{BrowseSource|wp-includes/post-thumbnail-template.php}}. |
== External Resources == | == External Resources == | ||
52行目: | 63行目: | ||
{{Post Thumbnail Tags}} | {{Post Thumbnail Tags}} | ||
− | {{Tag Footer}} | + | {{PHP Function Tag Footer}} |
+ | |||
+ | {{DEFAULTSORT:The_post_thumbnail}} | ||
+ | [[Category:wp2.9]] | ||
[[en:Template Tags/the_post_thumbnail]] | [[en:Template Tags/the_post_thumbnail]] |
2010年1月6日 (水) 01:06時点における版
このページ「テンプレートタグ/the post thumbnail」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています。
目次
Description
Display Post Thumbnail as set in post's edit screen. Thumbnail images are given class "attachment-thumbnail".
Usage
<?php the_post_thumbnail( $size, $attr ); ?>
Parameters
- size
- (int) (Optional) Image size. Default: 'thumbnail'
- attr
- (int) (Optional)
Examples
Default Usage
<?php the_post_thumbnail(); ?> <?php the_content(); ?>
More Options
the_post_thumbnail(); // without parameter -> Thumbnail the_post_thumbnail('thumbnail'); // Thumbnail the_post_thumbnail('medium'); // Medium resolution the_post_thumbnail('large'); // Large resolution the_post_thumbnail( array(100,100) ); // Othe resolutions
Notes
To enable post thumbnails, the current theme must include add_theme_support( 'post-thumbnails' );
in its functions.php file. 詳しくは Post Thumbnails/en を参照のこと。
Changelog
Since: 2.9.0
Source File
the_post_thumbnail() is located in wp-includes/post-thumbnail-template.php
.
External Resources
- Everything you need to know about WordPress 2.9’s post image feature, by JustintAdlock.com
- The Ultimative Guide For the_post_thumbnail In WordPress 2.9, by wpEngineer.com
最新英語版: WordPress Codex » Template Tags/the_post_thumbnail (最新版との差分)
Related
投稿サムネイル: has_post_thumbnail, the_post_thumbnail, get_post_thumbnail_id, get_the_post_thumbnail, add_image_size(), set_post_thumbnail_size()