Twenty Ten テーマのコード内の説明を日本語化しました


WordPress 3.0 より『Twenty Ten』がデフォルトテーマとなりましたが、WordPress 3.0 日本語版でもソースコードに併記されている説明は諸々の理由で英語のままとなっています。

『Twenty Ten』は 3.0 の特徴となる機能がいくつも盛り込まれているのに加え、WordPress のテーマを理解する上でとても良いお手本となるものだと思いますので、より理解が深まることも願って、日本語化をしてみました。

(ただし例によって突貫工事+眠気と闘いながら訳しましたので、若干 WordPress 日本語版と訳語がずれている箇所がありそうな気がします。もし見つけたらこっそり教えてくださいね^^;)

翻訳ファイル名一覧

twentyten
404.php
archive.php
attachment.php

author.php

category.php

comments.php

editor-style.css

editor-style-rtl.css

footer.php

functions.php

header.php

index.php

license.txt

loop.php

onecolumn-page.php

page.php

rtl.css

search.php

sidebar.php

sidebar-footer.php

single.php

style.css

tag.php

404.php

[php]
<?php
/**
* 404ページ(見つかりません) を表示するためのテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

<div id="container">
<div id="content" role="main">

<div id="post-0" class="post error404 not-found">
<h1 class="entry-title"><?php _e( ‘Not Found’, ‘twentyten’ ); ?></h1>
<div class="entry-content">
<p><?php _e( ‘Apologies, but the page you requested could not be found. Perhaps searching will help.’, ‘twentyten’ ); ?></p>
<?php get_search_form(); ?>
</div><!– .entry-content –>
</div><!– #post-0 –>

</div><!– #content –>
</div><!– #container –>
<script type="text/javascript">
// ロード後に検索フィールドにフォーカスさせる
document.getElementById(‘s’) && document.getElementById(‘s’).focus();
</script>

<?php get_footer(); ?>
[/php]

archive.php

[php]
<?php
/**
* アーカイブページを表示するためのテンプレート。
*
* 問合せに一致するものが特にない場合にアーカイブページを表示するのに使用されます。
* 例えば、date.php ファイルがない場合に日付ベースのページとなります。
*
* 詳しくは: http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E9%9A%8E%E5%B1%A4
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

<div id="container">
<div id="content" role="main">

<?php
/* 最初の記事を待ち行列に並べます。こうして、
* 扱う時間がいつであるのか分かるのです。
*
* rewind_posts() へのコールで適切に
* ループを走らせられるように、後でこれをリセットします。
*/
if ( have_posts() )
the_post();
?>

<h1 class="page-title">
<?php if ( is_day() ) : ?>
<?php printf( __( ‘Daily Archives: <span>%s</span>’, ‘twentyten’ ), get_the_date() ); ?>
<?php elseif ( is_month() ) : ?>
<?php printf( __( ‘Monthly Archives: <span>%s</span>’, ‘twentyten’ ), get_the_date(‘F Y’) ); ?>
<?php elseif ( is_year() ) : ?>
<?php printf( __( ‘Yearly Archives: <span>%s</span>’, ‘twentyten’ ), get_the_date(‘Y’) ); ?>
<?php else : ?>
<?php _e( ‘Blog Archives’, ‘twentyten’ ); ?>
<?php endif; ?>
</h1>

<?php
/* 先に the_post() を呼んでいるので、
* 適切に全部のループを走らせられるように、
* ループを最初まで巻き戻す必要があります。
*/
rewind_posts();

/* アーカイブページの記事を出力するためにループを走らせます。
* もし、子テーマでこれを上書きするなら、
* loop-archives.php ファイルを含めると、そのファイルが代わりに使われます。
*/
get_template_part( ‘loop’, ‘archive’ );
?>

</div><!– #content –>
</div><!– #container –>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

attachment.php

[php]
<?php
/**
* 添付ファイルを表示するためのテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

<div id="container">
<div id="content" role="main">

<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

<p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( ‘Return to %s’, ‘twentyten’ ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
/* 翻訳する人へ: %s には親記事のタイトルが入る */
printf( __( ‘<span class="meta-nav">&larr;</span> %s’, ‘twentyten’ ), get_the_title( $post->post_parent ) );
?></a></p>

<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><?php the_title(); ?></h2>

<div class="entry-meta">
<?php
printf(__(‘<span class="%1$s">By</span> %2$s’, ‘twentyten’),
‘meta-prep meta-prep-author’,
sprintf( ‘<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>’,
get_author_posts_url( get_the_author_meta( ‘ID’ ) ),
sprintf( esc_attr__( ‘View all posts by %s’, ‘twentyten’ ), get_the_author() ),
get_the_author()
)
);
?>
<span class="meta-sep">|</span>
<?php
printf( __(‘<span class="%1$s">Published</span> %2$s’, ‘twentyten’),
‘meta-prep meta-prep-entry-date’,
sprintf( ‘<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>’,
esc_attr( get_the_time() ),
get_the_date()
)
);
if ( wp_attachment_is_image() ) {
echo ‘ <span class="meta-sep">|</span> ‘;
$metadata = wp_get_attachment_metadata();
printf( __( ‘Full size is %s pixels’, ‘twentyten’),
sprintf( ‘<a href="%1$s" title="%2$s">%3$s &times; %4$s</a>’,
wp_get_attachment_url(),
esc_attr( __(‘Link to full-size image’, ‘twentyten’) ),
$metadata[‘width’],
$metadata[‘height’]
)
);
}
?>
<?php edit_post_link( __( ‘Edit’, ‘twentyten’ ), ‘<span class="meta-sep">|</span> <span class="edit-link">’, ‘</span>’ ); ?>
</div><!– .entry-meta –>

<div class="entry-content">
<div class="entry-attachment">
<?php if ( wp_attachment_is_image() ) :
$attachments = array_values( get_children( array( ‘post_parent’ => $post->post_parent, ‘post_status’ => ‘inherit’, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘order’ => ‘ASC’, ‘orderby’ => ‘menu_order ID’ ) ) );
foreach ( $attachments as $k => $attachment ) {
if ( $attachment->ID == $post->ID )
break;
}
$k++;
// ギャラリーにひとつ以上の添付画像がある場合
if ( count( $attachments ) > 1 ) {
if ( isset( $attachments[ $k ] ) )
// 次の添付画像の URL を取得します
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else
// あるいは最初の添付画像の URL を取得します
$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
} else {
// あるいは、添付画像がたったひとつの場合、その添付画像の URL を取得します
$next_attachment_url = wp_get_attachment_url();
}
?>
<p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
$attachment_size = apply_filters( ‘twentyten_attachment_size’, 900 );
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // 基本的に画像の高さは制限せず、画像の長さをフィルターで変更できます。
?></a></p>

<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_image_link( false ); ?></div>
<div class="nav-next"><?php next_image_link( false ); ?></div>
</div><!– #nav-below –>
<?php else : ?>
<a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
<?php endif; ?>
</div><!– .entry-attachment –>
<div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div>

<?php the_content( __( ‘Continue reading <span class="meta-nav">&rarr;</span>’, ‘twentyten’ ) ); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link">’ . __( ‘Pages:’, ‘twentyten’ ), ‘after’ => ‘</div>’ ) ); ?>

</div><!– .entry-content –>

<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( ‘Edit’, ‘twentyten’ ), ‘ <span class="edit-link">’, ‘</span>’ ); ?>
</div><!– .entry-utility –>
</div><!– #post-## –>

<?php comments_template(); ?>

<?php endwhile; ?>

</div><!– #content –>
</div><!– #container –>

<?php get_footer(); ?>
[/php]

author.php

[php]
<?php
/**
* 作者別アーカイブページを表示するテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

<div id="container">
<div id="content" role="main">

<?php
/* 最初の記事を待ち行列に並べます。こうして、
* 作者の名前、URL、説明、アバターなどを知ろうとするときに
* 作者が誰であるか分かるのです。
*
* rewind_posts() へのコールで適切に
* ループを走らせられるように、後でこれをリセットします。
*/
if ( have_posts() )
the_post();
?>

<h1 class="page-title author"><?php printf( __( ‘Author Archives: %s’, ‘twentyten’ ), "<span class=’vcard’><a class=’url fn n’ href=’" . get_author_posts_url( get_the_author_meta( ‘ID’ ) ) . "’ title=’" . esc_attr( get_the_author() ) . "’ rel=’me’>" . get_the_author() . "</a></span>" ); ?></h1>

<?php
// ユーザが説明を記入している場合、エントリーに略歴を表示します。
if ( get_the_author_meta( ‘description’ ) ) : ?>
<div id="entry-author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( ‘user_email’ ), apply_filters( ‘twentyten_author_bio_avatar_size’, 60 ) ); ?>
</div><!– #author-avatar –>
<div id="author-description">
<h2><?php printf( __( ‘About %s’, ‘twentyten’ ), get_the_author() ); ?></h2>
<?php the_author_meta( ‘description’ ); ?>
</div><!– #author-description –>
</div><!– #entry-author-info –>
<?php endif; ?>

<?php
/* 先に the_post() を呼んでいるので、
* 適切に全部のループを走らせられるように、
* ループを最初まで巻き戻す必要があります。
*/
rewind_posts();

/* 作者のアーカイブページの記事を出力するためにループを走らせます。
* もし、子テーマでこれを上書きするなら、
* loop-author.php ファイルを含めると、そのファイルが代わりに使われます。
*/
get_template_part( ‘loop’, ‘author’ );
?>
</div><!– #content –>
</div><!– #container –>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

category.php

[php]
<?php
/**
* カテゴリー別アーカイブページを表示するテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

<div id="container">
<div id="content" role="main">

<h1 class="page-title"><?php
printf( __( ‘Category Archives: %s’, ‘twentyten’ ), ‘<span>’ . single_cat_title( ”, false ) . ‘</span>’ );
?></h1>
<?php
$category_description = category_description();
if ( ! empty( $category_description ) )
echo ‘<div class="archive-meta">’ . $category_description . ‘</div>’;

/* カテゴリーページの記事を出力するためにループを走らせます。
* もし、子テーマでこれを上書きするなら、
* loop-category.php ファイルを含めると、そのファイルが代わりに使われます。
*/
get_template_part( ‘loop’, ‘category’ );
?>

</div><!– #content –>
</div><!– #container –>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

comments.php

[php]
<?php
/**
* コメントを表示するためのテンプレート。
*
* いまあるコメントとコメントフォームの両方を含むページのエリア。
* 実際のコメント表示は
* functions.php ファイルにある twentyten_comment への呼び戻し
* によって処理されます。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?>

<div id="comments">
<?php if ( post_password_required() ) : ?>
<p class="nopassword"><?php _e( ‘This post is password protected. Enter the password to view any comments.’, ‘twentyten’ ); ?></p>
</div><!– #comments –>
<?php
/* comments.php の残りが処理されるのを止めます。
* でないと、スクリプトを丸ごと殺せず、つまり依然として
* テンプレートを完全に読み込まなくてはならないからです。
*/
return;
endif;
?>

<?php
// ここは編集することができます。このコメントを含めて!
?>

<?php if ( have_comments() ) : ?>
<h3 id="comments-title"><?php
printf( _n( ‘One Response to %2$s’, ‘%1$s Responses to %2$s’, get_comments_number(), ‘twentyten’ ),
number_format_i18n( get_comments_number() ), ‘<em>’ . get_the_title() . ‘</em>’ );
?></h3>

<?php if ( get_comment_pages_count() > 1 && get_option( ‘page_comments’ ) ) : // 検索するためにコメントがありますか? ?>
<div class="navigation">
<div class="nav-previous"><?php previous_comments_link( __( ‘<span class="meta-nav">&larr;</span> Older Comments’, ‘twentyten’ ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( ‘Newer Comments <span class="meta-nav">&rarr;</span>’, ‘twentyten’ ) ); ?></div>
</div> <!– .navigation –>
<?php endif; // コメントナビゲージョンのためのチェック ?>

<ol class="commentlist">
<?php
/* コメントをループし、並べます。コメントをフォーマットするため
* wp_list_comments() に twentyten_comment() を使うようにさせます。
* 子テーマでこれを上書きしたいなら、
* twentyten_comment() を定義すると、それが代わりに使われます。
* 詳しくは、twentyten/functions.php の twentyten_comment() を見てください。
*/
wp_list_comments( array( ‘callback’ => ‘twentyten_comment’ ) );
?>
</ol>

<?php if ( get_comment_pages_count() > 1 && get_option( ‘page_comments’ ) ) : // 検索するためにコメントがありますか? ?>
<div class="navigation">
<div class="nav-previous"><?php previous_comments_link( __( ‘<span class="meta-nav">&larr;</span> Older Comments’, ‘twentyten’ ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( ‘Newer Comments <span class="meta-nav">&rarr;</span>’, ‘twentyten’ ) ); ?></div>
</div><!– .navigation –>
<?php endif; // コメントナビゲージョンのためのチェック ?>

<?php else : // あるいは、コメントがない場合:

/* コメントが全くない場合や、コメントが閉じられている場合、
* ささやかな注釈を残しましょう、ですよね?
*/
if ( ! comments_open() ) :
?>
<p class="nocomments"><?php _e( ‘Comments are closed.’, ‘twentyten’ ); ?></p>
<?php endif; // comments_open() の最後 ?>

<?php endif; // have_comments() の最後 ?>

<?php comment_form(); ?>

</div><!– #comments –>
[/php]

editor-style.css

[css]
/*
Theme Name: Twenty Ten
*/
/*
TinyMCE エディターにスタイルを設定するのに使用される。
*/
html .mceContentBody {
max-width:640px;
}
* {
font-family: Georgia, "Bitstream Charter", serif;
color: #444;
line-height: 1.5;
}
p,
dl,
td,
th,
ul,
ol,
blockquote {
font-size: 16px;
}
tr th,
thead th,
label,
tr th,
thead th {
font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
}
pre {
font-family: "Courier 10 Pitch", Courier, monospace;
}
code, code var {
font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}
body, input, textarea {
font-size: 12px;
line-height: 18px;
}
hr {
background-color: #E7E7E7;
border:0;
height: 1px;
margin-bottom: 18px;
clear:both;
}
/* テキスト要素 */
p {
margin-bottom: 18px;
}
ul {
list-style: square;
margin: 0 0 18px 1.5em;
}
ol {
list-style: decimal;
margin: 0 0 18px 1.5em;
}
ol ol {
list-style:upper-alpha;
}
ol ol ol {
list-style:lower-roman;
}
ol ol ol ol {
list-style:lower-alpha;
}
ul ul,
ol ol,
ul ol,
ol ul {
margin-bottom:0;
}
dl {
margin:0 0 24px 0;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: 18px;
}
strong {
font-weight: bold;
color: #000;
}
cite,
em,
i {
font-style: italic;
border: none;
}
big {
font-size: 131.25%;
}
ins {
background: #FFFFCC;
border: none;
color: #333;
}
del {
text-decoration: line-through;
color: #555;
}
blockquote {
font-style: italic;
padding: 0 3em;
}
blockquote cite,
blockquote em,
blockquote i {
font-style: normal;
}
pre {
background: #f7f7f7;
color: #222;
line-height: 18px;
margin-bottom: 18px;
padding: 1.5em;
}
abbr,
acronym {
border-bottom: 1px dotted #666;
cursor: help;
}
ins {
text-decoration: none;
}
sup,
sub {
height: 0;
line-height: 1;
vertical-align: baseline;
position: relative;
font-size: 10px;
}
sup {
bottom: 1ex;
}
sub {
top: .5ex;
}
a:link {
color:#0066CC;
}
a:visited {
color:#743399;
}
a:active,
a:hover {
color: #FF4B33;
}
p,
ul,
ol,
dd,
pre,
hr {
margin-bottom:24px;
}
ul ul,
ol ol,
ul ol,
ol ul {
margin-bottom:0;
}
pre,
kbd,
tt,
var {
font-size: 15px;
line-height: 21px;
}
code {
font-size: 13px;
}
strong,
b,
dt,
th {
color: #000;
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: #000;
margin: 0 0 20px 0;
line-height: 1.5em;
font-weight: normal;
}
h1 {
font-size: 2.4em;
}
h2 {
font-size: 1.8em;
}
h3 {
font-size: 1.4em;
}
h4 {
font-size: 1.2em;
}
h5 {
font-size: 1em;
}
h6 {
font-size: 0.9em;
}
table {
border: 1px solid #e7e7e7 !important;
text-align: left;
margin: 0 -1px 24px 0;
width: 100%;
border-collapse: collapse;
border-spacing: 0;
}
tr th,
thead th {
border: none !important;
color: #888;
font-size: 12px;
font-weight: bold;
line-height: 18px;
padding: 9px 24px;
}
tr td {
border: none !important;
border-top: 1px solid #e7e7e7 !important;
padding: 6px 24px;
}

img {
margin: 0;
max-width: 640px;
}
.alignleft,
img.alignleft {
display: inline;
float: left;
margin-right: 24px;
margin-top: 4px;
}
.alignright,
img.alignright {
display: inline;
float: right;
margin-left: 24px;
margin-top: 4px;
}
.aligncenter,
img.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
}
img.alignleft,
img.alignright,
img.aligncenter {
margin-bottom: 12px;
}
.wp-caption {
border: none;
background: #f1f1f1;
color: #888;
font-size: 12px;
line-height: 18px;
text-align: center;
margin-bottom: 20px;
padding: 4px;
-moz-border-radius: 0;
-khtml-border-radius: 0;
-webkit-border-radius: 0;
border-radius: 0;
}
.wp-caption img {
margin: 5px;
}
.wp-caption p.wp-caption-text {
margin: 0 0 4px;
}
.wp-smiley {
margin:0;
}
[/css]

editor-style-rtl.css

[php]
/*
Theme Name: Twenty Ten
*/
/*
TinyMCE エディターにスタイルを設定するのに使用される。
*/
html .mceContentBody{
direction:rtl;
unicode-bidi:embed;
float:right;
}
* {
font-family: Arial, Tahoma, sans-serif;
}
/* テキスト要素 */
ul {
margin: 0 -18px 18px 0;
}
ol {
margin: 0 -18px 18px 0;
}
dd {
margin-right: 0;
}
blockquote {
font-style: normal;
}
table {
text-align: right;
margin: 0 0 24px -1px;
}
html .mceContentBody{
direction:rtl;
unicode-bidi:embed;
float:right;
}
* {
font-family: Arial, Tahoma, sans-serif;
}
/* テキスト要素 */
ul {
margin: 0 -18px 18px 0;
}
ol {
margin: 0 -18px 18px 0;
}
dd {
margin-right: 0;
}
blockquote {
font-style: normal;
}
table {
text-align: right;
margin: 0 0 24px -1px;
}
[/php]

footer.php

[php]
<?php
/**
* フッターを表示するためのテンプレート。
*
* id=main の div 要素を閉じ、すべての要素の後にきます。
* 底部のウィジェットを表示するための sidebar-footer.php を呼び出します。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?>
</div><!– #main –>

<div id="footer" role="contentinfo">
<div id="colophon">

<?php
/* フッターにサイドバーですって? その通り。
* 四列のウィジェットでフッターをカスタマイズできるんです。
*/
get_sidebar( ‘footer’ );
?>

<div id="site-info">
<a href="<?php echo home_url( ‘/’ ) ?>" title="<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>" rel="home">
<?php bloginfo( ‘name’ ); ?>
</a>
</div><!– #site-info –>

<div id="site-generator">
<?php do_action( ‘twentyten_credits’ ); ?>
<a href="<?php echo esc_url( __(‘http://wordpress.org/’, ‘twentyten’) ); ?>"
title="<?php esc_attr_e(‘Semantic Personal Publishing Platform’, ‘twentyten’); ?>" rel="generator">
<?php printf( __(‘Proudly powered by %s.’, ‘twentyten’), ‘WordPress’ ); ?>
</a>
</div><!– #site-generator –>

</div><!– #colophon –>
</div><!– #footer –>

</div><!– #wrapper –>

<?php
/* wp_footer() はいつも、テーマの </body> タグの直後にあります。
* そうでないと、このフックを使って JavaScript ファイルを参照する
* 多くのプラグインの動作を止めてしまうでしょう。
*/

wp_footer();
?>
</body>
</html>
[/php]

functions.php

[php]
<?php
/**
* TwentyTen の機能と定義
*
* テーマをセットアップし、ヘルパー機能を提供します。一部のヘルパー機能は
* テーマの中でカスタムテンプレートタグとして使用されます。それ以外のものは、
* WordPress のコア機能を変更するアクションとフィルターフックに取り付けられます。
*
* 最初の機能は、 twentyten_setup() で、投稿サムネイルやナビゲーションメニューなど、
* WordPress の様々な機能のサポートをすることによってテーマを設定します。
*
* 子テーマを使うときは (詳しくは http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%BC%E3%83%9E%E3%81%AE%E4%BD%9C%E6%88%90 と
* http://wpdocs.sourceforge.jp/Child_Themes を見てください。)、子テーマの functions.php ファイルで機能を定義することで
* 上書きすることが出来ます(機能は、 function_exists() 呼び出しで囲われています) 。
* 子テーマの functions.php ファイルは親テーマファイルの前にインクルードされ、
* 子テーマの機能が使われます。
*
* 取り外せない機能(function_exists()で囲われていないもの)は、代わりに
* フィルターあるいはアクションフックに割り当てられています。フックは、remove_action() あるいは
* remove_filter() を使うことによって取り除くことができ、各自必要な機能をフックに割り当てることが出来ます。
*
* 親テーマのフックは割り当てられた後のみ取り外すことができます。これはつまり、子テーマの
* セットアップを終わるまで待つ必要があるということです。:
*
* <code>
* add_action( ‘after_setup_theme’, ‘my_child_theme_setup’ );
* function my_child_theme_setup() {
* // excerpt_length (あるいは、フィルターされていない値)に独自のフィルターをかけています。
* remove_filter( ‘excerpt_length’, ‘twentyten_excerpt_length’ );
* …
* }
* </code>
*
* フック、アクション、フィルターに関するさらに詳しい情報は、 http://wpdocs.sourceforge.jp/%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3_API を御覧ください。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

/**
* テーマデザインとスタイルシートに基づいて、コンテンツの長さを設定します。
*
* 画像とコンテンツの長さを設定するのに使われます。一般に style.css スタイルシートを通して
* テーマデザインにあった長さと同じにするべきでしょう。
*/
if ( ! isset( $content_width ) )
$content_width = 640;

/** ‘after_setup_theme’ フックが走ったら、twentyten_setup() を走らせます。 */
add_action( ‘after_setup_theme’, ‘twentyten_setup’ );

if ( ! function_exists( ‘twentyten_setup’ ) ):
/**
* 様々な WordPress の特徴をサポートするテーマデフォルトとレジスタをセットアップします。
*
* この function が after_setup_theme にフックされていて、init フックの前に走ることに注意してください。
* この init フックは、例えば投稿サムネイルのサポートの表示など、いくつかの特徴によっては
* 遅すぎるかもしれません(訳注:実行順を早めてあげる必要がある、ということだと思います)。
*
* 子テーマで twentyten_setup() を上書きするには、子テーマの functions.php ファイルに
* 独自の twentyten_setup を追加してください。
*
* @uses add_theme_support() 投稿サムネイルと自動フィードリンクをサポートします。
* @uses register_nav_menus() To ナビゲーションメニューをサポートします。
* @uses add_custom_background() カスタム背景をサポートします。
* @uses add_editor_style() ビジュアルエディターのスタイル変更をサポートします。
* @uses load_theme_textdomain() 翻訳/国際化をサポートします。
* @uses add_custom_image_header() カスタムヘッダーをサポートします。
* @uses register_default_headers() テーマに用意されるデフォルトのカスタムヘッダー画像を登録します。
* @uses set_post_thumbnail_size() 投稿サムネイルのサイズを設定します。
*
* @since Twenty Ten 1.0
*/
function twentyten_setup() {

// このテーマでは、テーマスタイルに合うように、editor-style.css でビジュアルエディタをスタイル付けします。
add_editor_style();

// このテーマでは投稿サムネイルを使用します。
add_theme_support( ‘post-thumbnails’ );

// デフォルトの記事 RSS フィードと、コメント RSS フィード を <head> 内に追加します。
add_theme_support( ‘automatic-feed-links’ );

// テーマを翻訳できるようにします。
// 翻訳ファイルは /languages/ ディレクトリ内に置くことが出来ます。
load_theme_textdomain( ‘twentyten’, TEMPLATEPATH . ‘/languages’ );

$locale = get_locale();
$locale_file = TEMPLATEPATH . "/languages/$locale.php";
if ( is_readable( $locale_file ) )
require_once( $locale_file );

// このテーマはある位置で、 wp_nav_menu() を使います。
register_nav_menus( array(
‘primary’ => __( ‘Primary Navigation’, ‘twentyten’ ),
) );

// このテーマでは、カスタム背景を設定できます。
add_custom_background();

// ヘッダーの変更はここから始まります。
define( ‘HEADER_TEXTCOLOR’, ” );
// CSSはなく、IMG を呼び出します。%s は、テーマテンプレートディレクトリの URL に取って代わります。
define( ‘HEADER_IMAGE’, ‘%s/images/headers/path.jpg’ );

// カスタムヘッダーの高さと長さ。テーマ独自のフィルターを使って、この値を変更できます。
// この値を変更するには、twentyten_header_image_width と twentyten_header_image_height にフィルターを追加します。
define( ‘HEADER_IMAGE_WIDTH’, apply_filters( ‘twentyten_header_image_width’, 940 ) );
define( ‘HEADER_IMAGE_HEIGHT’, apply_filters( ‘twentyten_header_image_height’, 198 ) );

// 記事とページのカスタムヘッダー画像に投稿サムネイルを使っています。
// 画像の大きさは長さ940ピクセル、高さ198ピクセルが望ましいです。
// それより大きな画像はフィットするように自動的にトリミングし、小さな画像は無視されます。詳しくは header.php ファイルを見てください。
set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );

// ヘッダー画像の中にテキストを入れないようにします。
define( ‘NO_HEADER_TEXT’, true );

// カスタムヘッダーの管理画面で、カスタムヘッダーを装飾できるようにします。
// 詳しくは下の twentyten_admin_header_style() を見てください。
add_custom_image_header( ”, ‘twentyten_admin_header_style’ );

// … ヘッダーの変更関連はここまでです。

// テーマにパッケージされたデフォルトのカスタムヘッダーです。%s は、テーマテンプレートディレクトリの URL に取って代わります。
register_default_headers( array(
‘berries’ => array(
‘url’ => ‘%s/images/headers/berries.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/berries-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Berries’, ‘twentyten’ )
),
‘cherryblossom’ => array(
‘url’ => ‘%s/images/headers/cherryblossoms.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/cherryblossoms-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Cherry Blossoms’, ‘twentyten’ )
),
‘concave’ => array(
‘url’ => ‘%s/images/headers/concave.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/concave-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Concave’, ‘twentyten’ )
),
‘fern’ => array(
‘url’ => ‘%s/images/headers/fern.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/fern-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Fern’, ‘twentyten’ )
),
‘forestfloor’ => array(
‘url’ => ‘%s/images/headers/forestfloor.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/forestfloor-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Forest Floor’, ‘twentyten’ )
),
‘inkwell’ => array(
‘url’ => ‘%s/images/headers/inkwell.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/inkwell-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Inkwell’, ‘twentyten’ )
),
‘path’ => array(
‘url’ => ‘%s/images/headers/path.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/path-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Path’, ‘twentyten’ )
),
‘sunset’ => array(
‘url’ => ‘%s/images/headers/sunset.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/sunset-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Sunset’, ‘twentyten’ )
)
) );
}
endif;

if ( ! function_exists( ‘twentyten_admin_header_style’ ) ) :
/**
* 外観 > ヘッダー に表示されるヘッダー画像をスタイル付けします。
*
* twentyten_setup() の add_custom_image_header() を通して参照します。
*
* @since Twenty Ten 1.0
*/
function twentyten_admin_header_style() {
?>
<style type="text/css">
/* フロンドエンドと同じボーダーを表示します。
#headimg {
border-bottom: 1px solid #000;
border-top: 4px solid #000;
}
/* NO_HEADER_TEXT が false であれば、このセレクターでテキストをスタイル付けできます。:
#headimg #name { }
#headimg #desc { }
*/
</style>
<?php
}
endif;

/**
* wp_title() の出力をフィルターすることで、<title> タグを変更します。
*
* サイトの説明があり、ホームページかブログの記事のページを表示しているなら、
* (つまり、固定のフロントページを使っているとき)、サイトの説明を追加します。
*
* もし、検索結果を表示しているなら、タイトルをまるごと再現します。
* すべてのタイトルに、検索結果のタイトルの中程と、すべてのタイトルの終りに、
* ページ番号を追加します。
*
* サイト名もすべてのタイトルに追加します。
*
* @since Twenty Ten 1.0
*
* @param string $title wp_title() によって作られるタイトル
* @param string $separator wp_title() を通る区切り。 Twenty Ten は
* header.php にて垂直の棒 "|", を区切りとして使います。
* @return string <title> タグ用の新しいタイトル
*/
function twentyten_filter_wp_title( $title, $separator ) {
// フィードの wp_title() 呼び出しには影響しません。
if ( is_feed() )
return $title;

// グローバル変数 $paged は 記事を並べる際のページ番号を含みます。
// グローバル変数 $page は番号を振られた記事のページ番号を含みます。
// 最初のページを見ているのでなければ、どちらが適用されていても表示します。
global $paged, $page;

if ( is_search() ) {
// 検索であれば、やり直します。:

$title = sprintf( __( ‘Search results for %s’, ‘twentyten’ ), ‘"’ . get_search_query() . ‘"’ );
// 2ページ目以降であれば、ページ番号を追加します。:
if ( $paged >= 2 )
$title .= " $separator " . sprintf( __( ‘Page %s’, ‘twentyten’ ), $paged );
// 終りにサイト名を追加します。:
$title .= " $separator " . get_bloginfo( ‘name’, ‘display’ );
// おしまい。wp_title() に新しいタイトルを送ります :
return $title;
}

// そうでなければ、終りにサイト名を追加します。:
$title .= get_bloginfo( ‘name’, ‘display’ );

// サイトの説明があって、ホーム/フロントページであれば、説明を追加します。:
$site_description = get_bloginfo( ‘description’, ‘display’ );
if ( $site_description && ( is_home() || is_front_page() ) )
$title .= " $separator " . $site_description;

// 必要であれば、ページ番号を追加します。:
if ( $paged >= 2 || $page >= 2 )
$title .= " $separator " . sprintf( __( ‘Page %s’, ‘twentyten’ ), max( $paged, $page ) );

// 新しいタイトルを wp_title() に返します。:
return $title;
}
add_filter( ‘wp_title’, ‘twentyten_filter_wp_title’, 10, 2 );

/**
* ホームリンクを表示するのに、 wp_nav_menu() 、 wp_page_menu() を引っ込めます。
*
* 子テーマでこれを上書きするには、フィルターを削除し、
* wp_page_menu_args フィルターフックへと結ばれる function を追加してください。
*
* @since Twenty Ten 1.0
*/
function twentyten_page_menu_args( $args ) {
$args[‘show_home’] = true;
return $args;
}
add_filter( ‘wp_page_menu_args’, ‘twentyten_page_menu_args’ );

/**
* 記事の抜粋の長さを40文字に設定します。
*
* これを子テーマで上書きするには、フィルターを削除し、
* excerpt_length フィルターフックと結ばれる function を追加してください。
*
* @since Twenty Ten 1.0
* @return int
*/
function twentyten_excerpt_length( $length ) {
return 40;
}
add_filter( ‘excerpt_length’, ‘twentyten_excerpt_length’ );

/**
* 抜粋に "続きを読む" リンクを返します。
*
* @since Twenty Ten 1.0
* @return string "続きを読む" リンク
*/
function twentyten_continue_reading_link() {
return ‘ <a href="’. get_permalink() . ‘">’ . __( ‘Continue reading <span class="meta-nav">&rarr;</span>’, ‘twentyten’ ) . ‘</a>’;
}

/**
* 省略記号と twentyten_continue_reading_link() で "[…]" を置き換えます(自動的に作られる抜粋に付け加えて)。
*
* これを子テーマで上書きするには、フィルターを取り除き、excerpt_more フィルターフックと結ばれる
* function を追加してください。
*
* @since Twenty Ten 1.0
* @return string An ellipsis
*/
function twentyten_auto_excerpt_more( $more ) {
return ‘ &hellip;’ . twentyten_continue_reading_link();
}
add_filter( ‘excerpt_more’, ‘twentyten_auto_excerpt_more’ );

/**
* カスタム投稿の抜粋に "続きを読む" リンクを加えます。
*
* これを子テーマで上書きするには、フィルターを取り除き、get_the_excerpt フィルターフック と結ばれる
* function を追加してください。
*
* @since Twenty Ten 1.0
* @return string Excerpt with a pretty "Continue Reading" link
*/
function twentyten_custom_excerpt_more( $output ) {
if ( has_excerpt() && ! is_attachment() ) {
$output .= twentyten_continue_reading_link();
}
return $output;
}
add_filter( ‘get_the_excerpt’, ‘twentyten_custom_excerpt_more’ );

/**
* ギャラリーのショートコードが使われるときに印字されるインラインスタイルを除去します。
*
* ギャラリーは Twenty Ten の style.css でスタイル付されています。
*
* @since Twenty Ten 1.0
* @return string ギャラリースタイルフィルターで、スタイルは除去されます。
*/
function twentyten_remove_gallery_css( $css ) {
return preg_replace( "#<style type=’text/css’>(.*?)</style>#s", ”, $css );
}
add_filter( ‘gallery_style’, ‘twentyten_remove_gallery_css’ );

if ( ! function_exists( ‘twentyten_comment’ ) ) :
/**
* コメントとピンバックのテンプレート。
*
* コメントテンプレートを修正することなく子テーマでこれを上書きするには
* 独自の twentyten_comment() を作ると、その function が代わりに使用されます。
*
* コメントを表示するための wp_list_comments() による呼び戻しとして使われています。
*
* @since Twenty Ten 1.0
*/
function twentyten_comment( $comment, $args, $depth ) {
$GLOBALS[‘comment’] = $comment;
switch ( $comment->comment_type ) :
case ” :
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<div id="comment-<?php comment_ID(); ?>">
<div class="comment-author vcard">
<?php echo get_avatar( $comment, 40 ); ?>
<?php printf( __( ‘%s <span class="says">says:</span>’, ‘twentyten’ ), sprintf( ‘<cite class="fn">%s</cite>’, get_comment_author_link() ) ); ?>
</div><!– .comment-author .vcard –>
<?php if ( $comment->comment_approved == ‘0’ ) : ?>
<em><?php _e( ‘Your comment is awaiting moderation.’, ‘twentyten’ ); ?></em>
<br />
<?php endif; ?>

<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
<?php
/* 翻訳者へ: 1: 日付, 2: 時間 */
printf( __( ‘%1$s at %2$s’, ‘twentyten’ ), get_comment_date(), get_comment_time() ); ?></a><?php edit_comment_link( __( ‘(Edit)’, ‘twentyten’ ), ‘ ‘ );
?>
</div><!– .comment-meta .commentmetadata –>

<div class="comment-body"><?php comment_text(); ?></div>

<div class="reply">
<?php comment_reply_link( array_merge( $args, array( ‘depth’ => $depth, ‘max_depth’ => $args[‘max_depth’] ) ) ); ?>
</div><!– .reply –>
</div><!– #comment-## –>

<?php
break;
case ‘pingback’ :
case ‘trackback’ :
?>
<li class="post pingback">
<p><?php _e( ‘Pingback:’, ‘twentyten’ ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __(‘(Edit)’, ‘twentyten’), ‘ ‘ ); ?></p>
<?php
break;
endswitch;
}
endif;

/**
* 2つのサイドバーとフッターにあるウィジェットを配置可能な4列を含む、ウィジェット化できる領域を登録します。
*
* 子テーマで twentyten_widgets_init() を上書きするには、アクションフックを取り除き、
* init フックに結び付けられた独自の function を追加してください。
*
* @since Twenty Ten 1.0
* @uses register_sidebar
*/
function twentyten_widgets_init() {
// エリア1、サイドバーの頭に位置します。
register_sidebar( array(
‘name’ => __( ‘Primary Widget Area’, ‘twentyten’ ),
‘id’ => ‘primary-widget-area’,
‘description’ => __( ‘The primary widget area’, ‘twentyten’ ),
‘before_widget’ => ‘<li id="%1$s" class="widget-container %2$s">’,
‘after_widget’ => ‘</li>’,
‘before_title’ => ‘<h3 class="widget-title">’,
‘after_title’ => ‘</h3>’,
) );

// エリア2、サイドバーのウィジェットエリア1の下に位置します。デフォルトでは空です。
register_sidebar( array(
‘name’ => __( ‘Secondary Widget Area’, ‘twentyten’ ),
‘id’ => ‘secondary-widget-area’,
‘description’ => __( ‘The secondary widget area’, ‘twentyten’ ),
‘before_widget’ => ‘<li id="%1$s" class="widget-container %2$s">’,
‘after_widget’ => ‘</li>’,
‘before_title’ => ‘<h3 class="widget-title">’,
‘after_title’ => ‘</h3>’,
) );

// エリア3、フッターに位置します。デフォルトでは空です。
register_sidebar( array(
‘name’ => __( ‘First Footer Widget Area’, ‘twentyten’ ),
‘id’ => ‘first-footer-widget-area’,
‘description’ => __( ‘The first footer widget area’, ‘twentyten’ ),
‘before_widget’ => ‘<li id="%1$s" class="widget-container %2$s">’,
‘after_widget’ => ‘</li>’,
‘before_title’ => ‘<h3 class="widget-title">’,
‘after_title’ => ‘</h3>’,
) );

// エリア4、フッターに位置します。デフォルトでは空です。
register_sidebar( array(
‘name’ => __( ‘Second Footer Widget Area’, ‘twentyten’ ),
‘id’ => ‘second-footer-widget-area’,
‘description’ => __( ‘The second footer widget area’, ‘twentyten’ ),
‘before_widget’ => ‘<li id="%1$s" class="widget-container %2$s">’,
‘after_widget’ => ‘</li>’,
‘before_title’ => ‘<h3 class="widget-title">’,
‘after_title’ => ‘</h3>’,
) );

// エリア5、フッターに位置します。デフォルトでは空です。
register_sidebar( array(
‘name’ => __( ‘Third Footer Widget Area’, ‘twentyten’ ),
‘id’ => ‘third-footer-widget-area’,
‘description’ => __( ‘The third footer widget area’, ‘twentyten’ ),
‘before_widget’ => ‘<li id="%1$s" class="widget-container %2$s">’,
‘after_widget’ => ‘</li>’,
‘before_title’ => ‘<h3 class="widget-title">’,
‘after_title’ => ‘</h3>’,
) );

// エリア6、フッターに位置します。デフォルトでは空です。
register_sidebar( array(
‘name’ => __( ‘Fourth Footer Widget Area’, ‘twentyten’ ),
‘id’ => ‘fourth-footer-widget-area’,
‘description’ => __( ‘The fourth footer widget area’, ‘twentyten’ ),
‘before_widget’ => ‘<li id="%1$s" class="widget-container %2$s">’,
‘after_widget’ => ‘</li>’,
‘before_title’ => ‘<h3 class="widget-title">’,
‘after_title’ => ‘</h3>’,
) );
}
/** widgets_init フック上で twentyten_widgets_init() を走らせてサイドバーを登録します。*/
add_action( ‘widgets_init’, ‘twentyten_widgets_init’ );

/**
* 最近のコメントウィジェットにパッケージされているデフォルトのスタイルを除去します。
*
* 子テーマでこれを上書きするには、フィルターを除去し、
* widgets_init アクションフックに結びついた独自の function を作成してください。
*
* @since Twenty Ten 1.0
*/
function twentyten_remove_recent_comments_style() {
global $wp_widget_factory;
remove_action( ‘wp_head’, array( $wp_widget_factory->widgets[‘WP_Widget_Recent_Comments’], ‘recent_comments_style’ ) );
}
add_action( ‘widgets_init’, ‘twentyten_remove_recent_comments_style’ );

if ( ! function_exists( ‘twentyten_posted_on’ ) ) :
/**
* 投稿日時、作成者に関するメタ情報を HTML で印字します。
*
* @since Twenty Ten 1.0
*/
function twentyten_posted_on() {
printf( __( ‘<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s’, ‘twentyten’ ),
‘meta-prep meta-prep-author’,
sprintf( ‘<a href="%1$s" title="%2$s" rel="bookmark"><span class="entry-date">%3$s</span></a>’,
get_permalink(),
esc_attr( get_the_time() ),
get_the_date()
),
sprintf( ‘<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>’,
get_author_posts_url( get_the_author_meta( ‘ID’ ) ),
sprintf( esc_attr__( ‘View all posts by %s’, ‘twentyten’ ), get_the_author() ),
get_the_author()
)
);
}
endif;

if ( ! function_exists( ‘twentyten_posted_in’ ) ) :
/**
* 記事(カテゴリー、タグ、パーマリンク)に関する情報を HTML で印字します。
*
* @since Twenty Ten 1.0
*/
function twentyten_posted_in() {
// 投稿のタグリストをコンマ区切りで取り出します。
$tag_list = get_the_tag_list( ”, ‘, ‘ );
if ( $tag_list ) {
$posted_in = __( ‘This entry was posted in %1$s and tagged %2$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.’, ‘twentyten’ );
} elseif ( is_object_in_taxonomy( get_post_type(), ‘category’ ) ) {
$posted_in = __( ‘This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.’, ‘twentyten’ );
} else {
$posted_in = __( ‘Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.’, ‘twentyten’ );
}
// プレースホルダーに取って代わる文字列を印字します。
printf(
$posted_in,
get_the_category_list( ‘, ‘ ),
$tag_list,
get_permalink(),
the_title_attribute( ‘echo=0’ )
);
}
endif;
[/php]

header.php

[php]
<?php
/**
* テーマのヘッダー。
*
* <head> 部分の全ての要素と、<div id="main"> までのあらゆるものを表示します。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( ‘charset’ ); ?>" />
<title><?php
/*
* 見るページに応じて、<title> タグを表示します。
* wp_title() の出力を少しフィルターしています。詳しくは、
* functions.php ファイルの twentyten_filter_wp_title() を見てください。
*/
wp_title( ‘|’, true, ‘right’ );

?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( ‘stylesheet_url’ ); ?>" />
<link rel="pingback" href="<?php bloginfo( ‘pingback_url’ ); ?>" />
<?php
/* コメントのスレッド表示が使用できるときには、それをサポートするように
* コメントフォームのあるページに JavaScript を追加します。
*/
if ( is_singular() && get_option( ‘thread_comments’ ) )
wp_enqueue_script( ‘comment-reply’ );

/* wp_footer() はいつも、テーマの </body> タグの直後にあります。
* そうでないと、このフックを使って <head> に
* スタイルやスクリプトやメタタグを加える
* 多くのプラグインの動作を止めてしまうでしょう。
*/
wp_head();
?>
</head>

<body <?php body_class(); ?>>
<div id="wrapper" class="hfeed">
<div id="header">
<div id="masthead">
<div id="branding" role="banner">
<?php $heading_tag = ( is_home() || is_front_page() ) ? ‘h1’ : ‘div’; ?>
<<?php echo $heading_tag; ?> id="site-title">
<span>
<a href="<?php echo home_url( ‘/’ ); ?>" title="<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>" rel="home"><?php bloginfo( ‘name’ ); ?></a>
</span>
</<?php echo $heading_tag; ?>>
<div id="site-description"><?php bloginfo( ‘description’ ); ?></div>

<?php
// これが記事か固定ページかどうか、サムネイルがあるか、あるとしたらそれが大きいものか、チェックします。
if ( is_singular() &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘post-thumbnail’ ) ) &&
$image[1] >= HEADER_IMAGE_WIDTH ) :
// ヒューストン、我々は新しいヘッダー画像を抱えている!
echo get_the_post_thumbnail( $post->ID, ‘post-thumbnail’ );
else : ?>
<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
<?php endif; ?>
</div><!– #branding –>

<div id="access" role="navigation">
<?php /* スクリーンリーダーやテキストブラウザーがナビゲーションメニューをスキップして、すぐにコンテンツに到達できるようにします。 */ ?>
<div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( ‘Skip to content’, ‘twentyten’ ); ?>"><?php _e( ‘Skip to content’, ‘twentyten’ ); ?></a></div>
<?php /* ナビゲーションメニューです。メニューが入力されていなければ、wp_nav_menu は wp_page_menu に戻ります。一番の位置に割り付けられたメニューが使われます。何も割り付けられていなければ、最も低い ID のメニューが使われます。 */ ?>
<?php wp_nav_menu( array( ‘container_class’ => ‘menu-header’, ‘theme_location’ => ‘primary’ ) ); ?>
</div><!– #access –>
</div><!– #masthead –>
</div><!– #header –>

<div id="main">
[/php]

index.php

[php]
<?php
/**
* メインテンプレートファイル。
*
* これは WordPress テーマで最も一般的なテンプレートファイルで、
* テーマに必要な2つのファイルのうちのひとつです(もうひとつのファイルは style.css になります)。
* 問合せに一致するものが特にないときにページを表示するのに使用されます。
* 例えば、home.php ファイルが存在しないときには、ホームページとなります。
* 詳しくは: http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E9%9A%8E%E5%B1%A4
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

<div id="container">
<div id="content" role="main">

<?php
/* 記事を出力するループを走らせます。
* もし、子テーマでこれを上書きするなら、
* loop-index.php ファイルを含めると、そのファイルが代わりに使われます。
*/
get_template_part( ‘loop’, ‘index’ );
?>
</div><!– #content –>
</div><!– #container –>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

license.txt

GPL プログラムの頒布条件として指定されているのはオリジナルである英語なので、翻訳したものじゃいかんということなのですが、理解を深めたい場合は非公式の日本語版を先人が作ってくださっていますので、こちらをご覧ください。

loop.php

[php]
<?php
/**
* 記事を表示するループ。
*
* ループは、記事とその内容を表示します。
* ループについては http://wpdocs.sourceforge.jp/The_Loop
* タグについては
* http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E3%82%BF%E3%82%B0
* をご覧ください。
*
* これは、loop.php または loop-template.php で上書きすることができ、
* ‘template’ の部分は、テンプレートからリクエストされる
* ループ内容になります。たとえば、loop-index.php は、
* そのファイルが存在していて、<code>get_template_part( ‘loop’, ‘index’ );</code>
* のコードで呼び出されるときに使われます。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?>

<?php /* 利用できるときに、次の/前のページへのナビゲージョンを表示します。 */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( ‘<span class="meta-nav">&larr;</span> Older posts’, ‘twentyten’ ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( ‘Newer posts <span class="meta-nav">&rarr;</span>’, ‘twentyten’ ) ); ?></div>
</div><!– #nav-above –>
<?php endif; ?>

<?php /* 表示できる記事がなければ、空のアーカイブページを表示します。e */ ?>
<?php if ( ! have_posts() ) : ?>
<div id="post-0" class="post error404 not-found">
<h1 class="entry-title"><?php _e( ‘Not Found’, ‘twentyten’ ); ?></h1>
<div class="entry-content">
<p><?php _e( ‘Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.’, ‘twentyten’ ); ?></p>
<?php get_search_form(); ?>
</div><!– .entry-content –>
</div><!– #post-0 –>
<?php endif; ?>

<?php
/* ループを開始します。
*
* Twenty Ten では、複数の状況で同じループを使います。
* 3つの主要部分に分かれていて:ギャラリー分類で
* 記事を表示する時、脇の分類で記事を表示する時、
* そしてその他のすべての記事を表示する時です。
*
* 加えて、アーカイブページにいるのか、検索ページにいるのか
* などなどを確認します。そうして、ささいな違いはありながらも、
* 共有されているループの残りを複製してしまうことなく、
* それぞれのテンプレートで使っています。
*
* これ以上の面倒なしにして、それではループです。:
*/ ?>
<?php while ( have_posts() ) : the_post(); ?>

<?php /* ギャラリー分類で記事を表示する方法 */ ?>

<?php if ( in_category( _x(‘gallery’, ‘gallery category slug’, ‘twentyten’) ) ) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyten’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>

<div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div><!– .entry-meta –>

<div class="entry-content">
<?php if ( post_password_required() ) : ?>
<?php the_content(); ?>
<?php else : ?>
<div class="gallery-thumb">
<?php
$images = get_children( array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’, ‘numberposts’ => 999 ) );
$total_images = count( $images );
$image = array_shift( $images );
$image_img_tag = wp_get_attachment_image( $image->ID, ‘thumbnail’ );
?>
<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
</div><!– .gallery-thumb –>
<p><em><?php printf( __( ‘This gallery contains <a %1$s>%2$s photos</a>.’, ‘twentyten’ ),
‘href="’ . get_permalink() . ‘" title="’ . sprintf( esc_attr__( ‘Permalink to %s’, ‘twentyten’ ), the_title_attribute( ‘echo=0’ ) ) . ‘" rel="bookmark"’,
$total_images
); ?></em></p>

<?php the_excerpt(); ?>
<?php endif; ?>
</div><!– .entry-content –>

<div class="entry-utility">
<a href="<?php echo get_term_link( _x(‘gallery’, ‘gallery category slug’, ‘twentyten’), ‘category’ ); ?>" title="<?php esc_attr_e( ‘View posts in the Gallery category’, ‘twentyten’ ); ?>"><?php _e( ‘More Galleries’, ‘twentyten’ ); ?></a>
<span class="meta-sep">|</span>
<span class="comments-link"><?php comments_popup_link( __( ‘Leave a comment’, ‘twentyten’ ), __( ‘1 Comment’, ‘twentyten’ ), __( ‘% Comments’, ‘twentyten’ ) ); ?></span>
<?php edit_post_link( __( ‘Edit’, ‘twentyten’ ), ‘<span class="meta-sep">|</span> <span class="edit-link">’, ‘</span>’ ); ?>
</div><!– .entry-utility –>
</div><!– #post-## –>

<?php /* 脇の分類で記事を表示する方法 */ ?>

<?php elseif ( in_category( _x(‘asides’, ‘asides category slug’, ‘twentyten’) ) ) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<?php if ( is_archive() || is_search() ) : // アーカイブと検索の抜粋を表示します。 ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!– .entry-summary –>
<?php else : ?>
<div class="entry-content">
<?php the_content( __( ‘Continue reading <span class="meta-nav">&rarr;</span>’, ‘twentyten’ ) ); ?>
</div><!– .entry-content –>
<?php endif; ?>

<div class="entry-utility">
<?php twentyten_posted_on(); ?>
<span class="meta-sep">|</span>
<span class="comments-link"><?php comments_popup_link( __( ‘Leave a comment’, ‘twentyten’ ), __( ‘1 Comment’, ‘twentyten’ ), __( ‘% Comments’, ‘twentyten’ ) ); ?></span>
<?php edit_post_link( __( ‘Edit’, ‘twentyten’ ), ‘<span class="meta-sep">|</span> <span class="edit-link">’, ‘</span>’ ); ?>
</div><!– .entry-utility –>
</div><!– #post-## –>

<?php /* その他のすべての記事を表示する方法 */ ?>

<?php else : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyten’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>

<div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div><!– .entry-meta –>

<?php if ( is_archive() || is_search() ) : // アーカイブと検索のみ抜粋を表示します。 ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!– .entry-summary –>
<?php else : ?>
<div class="entry-content">
<?php the_content( __( ‘Continue reading <span class="meta-nav">&rarr;</span>’, ‘twentyten’ ) ); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link">’ . __( ‘Pages:’, ‘twentyten’ ), ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –>
<?php endif; ?>

<div class="entry-utility">
<?php if ( count( get_the_category() ) ) : ?>
<span class="cat-links">
<?php printf( __( ‘<span class="%1$s">Posted in</span> %2$s’, ‘twentyten’ ), ‘entry-utility-prep entry-utility-prep-cat-links’, get_the_category_list( ‘, ‘ ) ); ?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
<?php
$tags_list = get_the_tag_list( ”, ‘, ‘ );
if ( $tags_list ):
?>
<span class="tag-links">
<?php printf( __( ‘<span class="%1$s">Tagged</span> %2$s’, ‘twentyten’ ), ‘entry-utility-prep entry-utility-prep-tag-links’, $tags_list ); ?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
<span class="comments-link"><?php comments_popup_link( __( ‘Leave a comment’, ‘twentyten’ ), __( ‘1 Comment’, ‘twentyten’ ), __( ‘% Comments’, ‘twentyten’ ) ); ?></span>
<?php edit_post_link( __( ‘Edit’, ‘twentyten’ ), ‘<span class="meta-sep">|</span> <span class="edit-link">’, ‘</span>’ ); ?>
</div><!– .entry-utility –>
</div><!– #post-## –>

<?php comments_template( ”, true ); ?>

<?php endif; // これは、ループをカテゴリーに応じて3つの部分に分ける if 宣言でした。 ?>

<?php endwhile; // End the loop. Whew. ?>

<?php /* 利用できるときに、次の/前のページへのナビゲージョンを表示します。 */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( ‘<span class="meta-nav">&larr;</span> Older posts’, ‘twentyten’ ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( ‘Newer posts <span class="meta-nav">&rarr;</span>’, ‘twentyten’ ) ); ?></div>
</div><!– #nav-below –>
<?php endif; ?>
[/php]

onecolumn-page.php

[php]
<?php
/**
* Template Name: 1列、サイドバーなし
*
* サイドバーなしのカスタムページテンプレート。
*
* 上記の"テンプレート名:"の部分はページ編集画面の
* ドロップダウンメニューで選択できます。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

<div id="container" class="one-column">
<div id="content" role="main">

<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link">’ . __( ‘Pages:’, ‘twentyten’ ), ‘after’ => ‘</div>’ ) ); ?>
<?php edit_post_link( __( ‘Edit’, ‘twentyten’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</div><!– .entry-content –>
</div><!– #post-## –>

<?php comments_template( ”, true ); ?>

<?php endwhile; ?>

</div><!– #content –>
</div><!– #container –>

<?php get_footer(); ?>
[/php]

page.php

[php]
<?php
/**
* すべての固定ページを表示するためのテンプレート。
*
* これは、デフォルトですべての固定ページを表示するテンプレートです。
* これが WordPress の固定ページの構成であることと、
* お持ちの WordPress サイトの他の ‘固定ページ’ は
* 別のテンプレートを使う、ということに注意してください。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

<div id="container">
<div id="content" role="main">

<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_front_page() ) { ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php } else { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } ?>

<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link">’ . __( ‘Pages:’, ‘twentyten’ ), ‘after’ => ‘</div>’ ) ); ?>
<?php edit_post_link( __( ‘Edit’, ‘twentyten’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</div><!– .entry-content –>
</div><!– #post-## –>

<?php comments_template( ”, true ); ?>

<?php endwhile; ?>

</div><!– #content –>
</div><!– #container –>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

rtl.css

[css]
/*
Theme Name: Twenty Ten
*/

/*
RTL 基礎(訳注:RTL=アラビア語やヘブライ語のように右から左へと書く言語)
*/

body {
direction:rtl;
unicode-bidi:embed;
}

/*
レイアウト: 2列 (右)
説明: コンテンツの右にひとつのサイドバーがある2列固定レイアウト
*/

#container {
float: right;
margin: 0 0 0 -240px;
}
#content {
margin: 0 20px 36px 280px;
}
#primary,
#secondary {
float: left;
}
#secondary {
clear: left;
}

/* =フォント
————————————————————– */
body,
input,
textarea,
.page-title span,
.pingback a.url,
h3#comments-title,
h3#reply-title,
#access .menu,
#access div.menu ul,
#cancel-comment-reply-link,
.form-allowed-tags,
#site-info,
#site-title,
#wp-calendar,
.comment-meta,
.comment-body tr th,
.comment-body thead th,
.entry-content label,
.entry-content tr th,
.entry-content thead th,
.entry-meta,
.entry-title,
.entry-utility,
#respond label,
.navigation,
.page-title,
.pingback p,
.reply,
.widget-title,
input[type=submit] {
font-family: Arial, Tahoma, sans-serif;
}

/* =構造
————————————————————– */

/* メインテーマ構造 */
#footer-widget-area .widget-area {
float: right;
margin-left: 20px;
margin-right: 0;
}
#footer-widget-area #fourth {
margin-left: 0;
}
#site-info {
float: right;
}
#site-generator {
float: left;
}

/* =グローバル要素
————————————————————– */

/* テキスト要素 */
ul {
margin: 0 1.5em 18px 0;
}
blockquote {
font-style: normal;
}

/* スクリーンリーダーのみに向けたテキスト */
.screen-reader-text {
left: auto;
text-indent:-9000px;
overflow:hidden;
}

/* =ヘッダー
————————————————————– */

#site-title {
float: right;
}
#site-description {
clear: left;
float: left;
font-style: normal;
}

/* =メニュー
————————————————————– */

#access {
float:right;
}

#access .menu-header,
div.menu {
margin-right: 12px;
margin-left: 0;
}

#access .menu-header li,
div.menu li{
float:right;
}

#access ul ul {
left:auto;
right:0;
float:right;
}
#access ul ul ul {
left:auto;
right:100%;
}

/* =コンテンツ
————————————————————– */

#content table {
text-align: right;
margin: 0 0 24px -1px;
}
.page-title span {
font-style:normal;
}
.entry-title,
.entry-meta {
clear: right;
float: right;
margin-left: 68px;
margin-right: 0;
}

.entry-content input.file,
.entry-content input.button {
margin-left: 24px;
margin-right:0;
}
.entry-content blockquote.left {
float: right;
margin-right: 0;
margin-left: 24px;
text-align: left;
}
.entry-content blockquote.right {
float: left;
margin-right: 24px;
margin-left: 0;
text-align: right;
}
#entry-author-info #author-avatar {
float: right;
margin: 0 0 0 -104px;
}
#entry-author-info #author-description {
float: right;
margin: 0 104px 0 0;
}

/* ギャラリーの並べ方
————————————————————– */

.category-gallery .gallery-thumb {
float: right;
margin-left:20px;
margin-right:0;
}

/* 画像
————————————————————– */

#content .gallery .gallery-caption {
margin-right: 0;
}

#content .gallery .gallery-item {
float: right;
}

/* =ナビゲーション
————————————————————– */
.nav-previous {
float: right;
}
.nav-next {
float: left;
text-align:left;
}

/* =コメント
————————————————————– */

.commentlist li.comment {
padding: 0 56px 0 0;
}
.commentlist .avatar {
right: 0;
left: auto;
}
.comment-author .says, #comments .pingback .url {
font-style: normal;
}

/* コメントフォーム */
.children #respond {
margin: 0 0 0 48px;
}

/* =ウィジェット領域
————————————————————– */

.widget-area ul {
margin-right: 0;
}
.widget-area ul ul {
margin-right: 1.3em;
margin-left: 0;
}
#wp-calendar caption {
text-align: right;
}
#wp-calendar tfoot #next {
text-align: left;
}

/* メインサイドバー */
#main .widget-area ul {
margin-right: 0;
padding: 0 0 0 20px;
}
#main .widget-area ul ul {
margin-right: 1.3em;
margin-left: 0;
}

/* =フッター
————————————————————– */
#site-generator {
font-style:normal;
}
#site-generator a {
background-position: right center;
padding-right: 20px;
padding-left: 0;
}
[/css]

search.php

[php]
<?php
/**
* 検索結果ページを表示するためのテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

<div id="container">
<div id="content" role="main">

<?php if ( have_posts() ) : ?>
<h1 class="page-title"><?php printf( __( ‘Search Results for: %s’, ‘twentyten’ ), ‘<span>’ . get_search_query() . ‘</span>’ ); ?></h1>
<?php
/* 検索結果を出力するためにループを走らせます。
* 子テーマでこれを上書きしたい場合は、
* loop-search.php ファイルを含めると、そのファイルが代わりに使われます。
*/
get_template_part( ‘loop’, ‘search’ );
?>
<?php else : ?>
<div id="post-0" class="post no-results not-found">
<h2 class="entry-title"><?php _e( ‘Nothing Found’, ‘twentyten’ ); ?></h2>
<div class="entry-content">
<p><?php _e( ‘Sorry, but nothing matched your search criteria. Please try again with some different keywords.’, ‘twentyten’ ); ?></p>
<?php get_search_form(); ?>
</div><!– .entry-content –>
</div><!– #post-0 –>
<?php endif; ?>
</div><!– #content –>
</div><!– #container –>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

sidebar.php

[php]
<?php
/**
* 第一、第二のウィジェット領域を含むサイドバー。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?>

<div id="primary" class="widget-area" role="complementary">
<ul class="xoxo">

<?php
/* dynamic_sidebar() function を呼びだすと、ウィジェット領域に
* ウェジェットを吐き出します。 代わりに false を返すと、
* サイドバーは存在せず、 万が一のために
* デフォルトのサイドバーをハードコードします。
*/
if ( ! dynamic_sidebar( ‘primary-widget-area’ ) ) : ?>

<li id="search" class="widget-container widget_search">
<?php get_search_form(); ?>
</li>

<li id="archives" class="widget-container">
<h3 class="widget-title"><?php _e( ‘Archives’, ‘twentyten’ ); ?></h3>
<ul>
<?php wp_get_archives( ‘type=monthly’ ); ?>
</ul>
</li>

<li id="meta" class="widget-container">
<h3 class="widget-title"><?php _e( ‘Meta’, ‘twentyten’ ); ?></h3>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</li>

<?php endif; // ウィジェットエリア1の終わり ?>
</ul>
</div><!– #primary .widget-area –>

<?php
// ウィジェット用の第二のサイドバー。
if ( is_active_sidebar( ‘secondary-widget-area’ ) ) : ?>

<div id="secondary" class="widget-area" role="complementary">
<ul class="xoxo">
<?php dynamic_sidebar( ‘secondary-widget-area’ ); ?>
</ul>
</div><!– #secondary .widget-area –>

<?php endif; ?>
[/php]

sidebar-footer.php

[php]
<?php
/**
* フッターウィジェット領域。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?>

<?php
/* フッターウィジェット領域は、その領域のいずれかに
* ウィジェットがあると動作します。最初にこのことを確認しましょう。
*
* サイドバーのいずれにもウィジェットがなければ、諦めましょう。
*/
if ( ! is_active_sidebar( ‘first-footer-widget-area’ )
&& ! is_active_sidebar( ‘second-footer-widget-area’ )
&& ! is_active_sidebar( ‘third-footer-widget-area’ )
&& ! is_active_sidebar( ‘fourth-footer-widget-area’ )
)
return;
// これに成功すれば、ウィジェットがあります。こうしましょう。
?>

<div id="footer-widget-area" role="complementary">

<?php if ( is_active_sidebar( ‘first-footer-widget-area’ ) ) : ?>
<div id="first" class="widget-area">
<ul class="xoxo">
<?php dynamic_sidebar( ‘first-footer-widget-area’ ); ?>
</ul>
</div><!– #first .widget-area –>
<?php endif; ?>

<?php if ( is_active_sidebar( ‘second-footer-widget-area’ ) ) : ?>
<div id="second" class="widget-area">
<ul class="xoxo">
<?php dynamic_sidebar( ‘second-footer-widget-area’ ); ?>
</ul>
</div><!– #second .widget-area –>
<?php endif; ?>

<?php if ( is_active_sidebar( ‘third-footer-widget-area’ ) ) : ?>
<div id="third" class="widget-area">
<ul class="xoxo">
<?php dynamic_sidebar( ‘third-footer-widget-area’ ); ?>
</ul>
</div><!– #third .widget-area –>
<?php endif; ?>

<?php if ( is_active_sidebar( ‘fourth-footer-widget-area’ ) ) : ?>
<div id="fourth" class="widget-area">
<ul class="xoxo">
<?php dynamic_sidebar( ‘fourth-footer-widget-area’ ); ?>
</ul>
</div><!– #fourth .widget-area –>
<?php endif; ?>

</div><!– #footer-widget-area –>
[/php]

single.php

[php]
<?php
/**
* すべての記事を表示するためのテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

<div id="container">
<div id="content" role="main">

<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>

<div id="nav-above" class="navigation">
<div class="nav-previous"><?php previous_post_link( ‘%link’, ‘<span class="meta-nav">’ . _x( ‘&larr;’, ‘Previous post link’, ‘twentyten’ ) . ‘</span> %title’ ); ?></div>
<div class="nav-next"><?php next_post_link( ‘%link’, ‘%title <span class="meta-nav">’ . _x( ‘&rarr;’, ‘Next post link’, ‘twentyten’ ) . ‘</span>’ ); ?></div>
</div><!– #nav-above –>

<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h1 class="entry-title"><?php the_title(); ?></h1>

<div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div><!– .entry-meta –>

<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link">’ . __( ‘Pages:’, ‘twentyten’ ), ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –>

<?php if ( get_the_author_meta( ‘description’ ) ) : // ユーザが説明を記入している場合は、略歴を表示します。 ?>
<div id="entry-author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( ‘user_email’ ), apply_filters( ‘twentyten_author_bio_avatar_size’, 60 ) ); ?>
</div><!– #author-avatar –>
<div id="author-description">
<h2><?php printf( esc_attr__( ‘About %s’, ‘twentyten’ ), get_the_author() ); ?></h2>
<?php the_author_meta( ‘description’ ); ?>
<div id="author-link">
<a href="<?php echo get_author_posts_url( get_the_author_meta( ‘ID’ ) ); ?>">
<?php printf( __( ‘View all posts by %s <span class="meta-nav">&rarr;</span>’, ‘twentyten’ ), get_the_author() ); ?>
</a>
</div><!– #author-link –>
</div><!– #author-description –>
</div><!– #entry-author-info –>
<?php endif; ?>

<div class="entry-utility">
<?php twentyten_posted_in(); ?>
<?php edit_post_link( __( ‘Edit’, ‘twentyten’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</div><!– .entry-utility –>
</div><!– #post-## –>

<div id="nav-below" class="navigation">
<div class="nav-previous"><?php previous_post_link( ‘%link’, ‘<span class="meta-nav">’ . _x( ‘&larr;’, ‘Previous post link’, ‘twentyten’ ) . ‘</span> %title’ ); ?></div>
<div class="nav-next"><?php next_post_link( ‘%link’, ‘%title <span class="meta-nav">’ . _x( ‘&rarr;’, ‘Next post link’, ‘twentyten’ ) . ‘</span>’ ); ?></div>
</div><!– #nav-below –>

<?php comments_template( ”, true ); ?>

<?php endwhile; // ループの終わり ?>

</div><!– #content –>
</div><!– #container –>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

style.css

[css]
@charset "utf-8";
/*
Theme Name: Twenty Ten
Theme URI: http://wordpress.org/
Description: WordPress のデフォルトテーマ、2010。
Author: the WordPress team
Version: 1.0
Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style
*/

/* ブラウザーの持つデフォルトの CSS をリセットします。Eric Meyer による作業に基づきます: http://meyerweb.com/eric/tools/css/reset/index.html
————————————————————– */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
vertical-align: baseline;
background: transparent;
}
body {
line-height: 1;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
clear: both;
}
ol, ul {
list-style: none;
}
blockquote {
quotes: none;
}
blockquote:before, blockquote:after {
content: ”;
content: none;
}
del {
text-decoration: line-through;
}
/* テーブルはまだ、マークアップに ‘cellspacing="0"’ を必要とします。 */
table {
border-collapse: collapse;
border-spacing: 0;
}
a img { border: none; }

/*
レイアウト: 2列
説明: コンテンツの右にサイドバーのある2列固定レイアウト
*/

#container {
float: left;
margin: 0 -240px 0 0;
width: 100%;
}
#content {
margin: 0 280px 0 20px;
}
#primary,
#secondary {
float: right;
overflow: hidden;
width: 220px;
}
#secondary {
clear: right;
}
#footer {
clear: both;
width: 100%;
}

/*
レイアウト: 1列でサイドバーなし
説明: サイドバーなしの中央1列
*/

.one-column #content {
margin: 0 auto;
width: 640px;
}

/*
レイアウト: 長さ目一杯で、サイドバーなし
説明: サイドバーなしの長さ目一杯のコンテンツ; 添付ファイルのページに使用されます。
*/

.single-attachment #content {
margin: 0 auto;
width: 900px;
}

/* =フォント
————————————————————– */
body,
input,
textarea,
.page-title span,
.pingback a.url {
font-family: Georgia, "Bitstream Charter", serif;
}

h3#comments-title,
h3#reply-title,
#access .menu,
#access div.menu ul,
#cancel-comment-reply-link,
.form-allowed-tags,
#site-info,
#site-title,
#wp-calendar,
.comment-meta,
.comment-body tr th,
.comment-body thead th,
.entry-content label,
.entry-content tr th,
.entry-content thead th,
.entry-meta,
.entry-title,
.entry-utility,
#respond label,
.navigation,
.page-title,
.pingback p,
.reply,
.widget-title,
.wp-caption-text,
input[type=submit]
{
font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
}
pre {
font-family: "Courier 10 Pitch", Courier, monospace;
}
code {
font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}

/* =構造
————————————————————– */

/* メインのテーマ構造 */
#access .menu-header,
div.menu,
#colophon,
#branding,
#main,
#wrapper {
margin: 0 auto;
width: 940px;
}
#wrapper {
margin-top: 20px;
background: #fff;
padding: 0 20px;
}

/* フッター領域の構造 */
#footer-widget-area {
overflow: hidden;
}
#footer-widget-area .widget-area {
float: left;
margin-right: 20px;
width: 220px;
}
#footer-widget-area #fourth {
margin-right: 0;
}
#site-info {
float: left;
width: 700px;
font-weight: bold;
font-size: 14px;
}
#site-generator {
float: right;
width: 220px;
}

/* =グローバル要素
————————————————————– */

/* メインのグローバル ‘テーマ’ とフォントスタイル */
body {
background: #f1f1f1;
}

body,
input,
textarea {
color: #666;
font-size: 12px;
line-height: 18px;
}
hr {
background-color: #E7E7E7;
border:0;
height: 1px;
margin-bottom: 18px;
clear:both;
}

/* テキスト要素 */
p {
margin-bottom: 18px;
}
ul {
list-style: square;
margin: 0 0 18px 1.5em;
}
ol {
list-style: decimal;
margin: 0 0 18px 1.5em;
}
ol ol {
list-style:upper-alpha;
}
ol ol ol {
list-style:lower-roman;
}
ol ol ol ol {
list-style:lower-alpha;
}
ul ul,
ol ol,
ul ol,
ol ul {
margin-bottom:0;
}
dl {
margin:0 0 24px 0;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: 18px;
}
strong {
font-weight: bold;
}
cite,
em,
i {
font-style: italic;
}
big {
font-size: 131.25%;
}
ins {
background: #ffc;
text-decoration: none;
}
blockquote {
font-style: italic;
padding: 0 3em;
}
blockquote cite,
blockquote em,
blockquote i {
font-style: normal;
}
pre {
background: #f7f7f7;
color: #222;
line-height: 18px;
margin-bottom: 18px;
padding: 1.5em;
}
abbr,
acronym {
border-bottom: 1px dotted #666;
cursor: help;
}

sup,
sub {
height: 0;
line-height: 1;
vertical-align: baseline;
position: relative;
}
sup {
bottom: 1ex;
}
sub {
top: .5ex;
}
input[type="text"],
textarea {
padding: 2px;
background: #f9f9f9;
border: 1px solid #ccc;
box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
-moz-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
-webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
}
a:link {
color:#0066CC;
}
a:visited {
color:#743399;
}
a:active,
a:hover {
color: #FF4B33;
}

/* スクリーンリーダーのみに向けたテキスト */
.screen-reader-text {
position: absolute;
left: -9000px;
}

/* =ヘッダー
————————————————————– */

#header {
padding: 30px 0 0 0;
}
#site-title {
float: left;
margin: 0 0 18px 0;
width: 700px;
font-size: 30px;
line-height: 36px;
}
#site-title a {
color: #000;
font-weight: bold;
text-decoration: none;
}
#site-description {
clear: right;
float: right;
font-style: italic;
margin: 14px 0 18px 0;
width: 220px;
}

/* これはカスタムヘッダー画像です。 */
#branding img {
clear: both;
border-top: 4px solid #000;
display: block;
border-bottom: 1px solid #000;
}

/* =メニュー
————————————————————– */

#access {
background: #000;
margin: 0 auto;
width: 940px;
display:block;
float:left;
}
#access .menu-header,
div.menu {
font-size: 13px;
margin-left: 12px;
}
#access .menu-header ul,
div.menu ul {
list-style: none;
margin: 0;
}
#access .menu-header li,
div.menu li {
float:left;
position: relative;
}
#access a {
display:block;
text-decoration:none;
color:#aaa;
padding:0 10px;
line-height:38px;
}
#access ul ul {
display:none;
position:absolute;
top:38px;
left:0;
float:left;
box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
-moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
width: 180px;
z-index: 99999;
}
#access ul ul li {
min-width: 180px;
}
#access ul ul ul {
left:100%;
top:0;
}
#access ul ul a {
background:#333;
height:auto;
line-height:1em;
padding:10px;
width: 160px;
}
#access li:hover > a,
#access ul ul :hover > a {
color:#fff;
background:#333;
}
#access ul li:hover > ul {
display:block;
}
#access ul li.current_page_item > a,
#access ul li.current-menu-ancestor > a,
#access ul li.current-menu-item > a,
#access ul li.current-menu-parent > a {
color: #fff;
}

* html #access ul li.current_page_item a,
* html #access ul li.current-menu-ancestor a,
* html #access ul li.current-menu-item a,
* html #access ul li.current-menu-parent a,
* html #access ul li a:hover {
color:#fff;
}

/* =コンテンツ
————————————————————– */

#main {
overflow: hidden;
padding: 40px 0 0 0;
}
#content {
margin-bottom: 36px;
}
#content,
#content input,
#content textarea {
color: #333;
font-size: 16px;
line-height: 24px;
}
#content p,
#content ul,
#content ol,
#content dd,
#content pre,
#content hr {
margin-bottom:24px;
}
#content ul ul,
#content ol ol,
#content ul ol,
#content ol ul {
margin-bottom:0;
}
#content pre,
#content kbd,
#content tt,
#content var {
font-size: 15px;
line-height: 21px;
}
#content code {
font-size: 13px;
}
#content dt,
#content th {
color: #000;
}
#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6 {
color: #000;
margin: 0 0 20px 0;
line-height: 1.5em;
}
#content table {
border: 1px solid #e7e7e7;
text-align: left;
margin: 0 -1px 24px 0;
width: 100%;
}
#content tr th,
#content thead th {
color: #888;
font-size: 12px;
font-weight: bold;
line-height: 18px;
padding: 9px 24px;
}
#content tr td {
border-top: 1px solid #e7e7e7;
padding: 6px 24px;
}
#content tr.odd td {
background: #F2F7FC;
}
.hentry {
margin: 0 0 48px 0;
}
.home .sticky {
background: #F2F7FC;
border-top: 4px solid #000;
padding: 18px 20px;
margin-left: -20px;
margin-right: -20px;
}
.single .hentry {
margin: 0 0 36px 0;
}
.page-title {
color: #000;
font-size: 14px;
font-weight: bold;
margin: 0 0 36px 0;
}
.page-title span {
color: #333;
font-size: 16px;
font-style: italic;
font-weight: normal;
}
.page-title a:link,
.page-title a:visited {
color:#888;
text-decoration: none;
}
.page-title a:active,
.page-title a:hover {
color: #FF4B33;
}
#content .entry-title {
color: #000;
font-size: 21px;
line-height: 1.3em;
font-weight: bold;
margin-bottom: 0;
}
.entry-title a:link,
.entry-title a:visited {
color:#000;
text-decoration: none;
}
.entry-title a:active,
.entry-title a:hover {
color: #FF4B33;
}
.entry-meta {
color: #888;
font-size: 12px;
}
.entry-meta abbr,
.entry-utility abbr {
border: none;
}
.entry-meta abbr:hover,
.entry-utility abbr:hover {
border-bottom: 1px dotted #666;
}
.entry-content,
.entry-summary {
clear: both;
padding: 12px 0 0 0;
}
#content .entry-summary p:last-child {
margin-bottom: 12px;
}
.entry-content fieldset {
border: 1px solid #E7E7E7;
margin: 0 0 24px 0;
padding: 24px;
}
.entry-content fieldset legend {
background: #fff;
color: #000;
font-weight: bold;
padding: 0 24px;
}
.entry-content input {
margin: 0 0 24px 0;
}
.entry-content input.file,
.entry-content input.button {
margin-right: 24px;
}
.entry-content label {
color: #888;
font-size: 12px;
}
.entry-content select {
margin: 0 0 24px 0;
}
.entry-content sup,
.entry-content sub {
font-size: 10px;
}
.entry-content blockquote.left {
float: left;
margin-left: 0;
margin-right: 24px;
text-align: right;
width: 33%;
}
.entry-content blockquote.right {
float: right;
margin-left: 24px;
margin-right: 0;
text-align: left;
width: 33%;
}
.page-link {
color: #000;
font-weight:bold;
margin:0 0 22px 0;
word-spacing:0.5em;
}
.page-link a:link,
.page-link a:visited {
background: #f1f1f1;
color:#333;
font-weight:normal;
padding:0.5em 0.75em;
text-decoration:none;
}
.home .sticky .page-link a {
background: #D9E8F7;
}
.page-link a:active,
.page-link a:hover {
color: #FF4B33;
}
.page .edit-link {
clear: both;
display: block;
}
#entry-author-info {
background: #F2F7FC;
border-top: 4px solid #000;
padding: 18px 20px;
margin: 24px 0;
overflow: hidden;
clear: both;
font-size: 14px;
line-height: 20px;
}
#entry-author-info #author-avatar {
background: #fff;
border: 1px solid #e7e7e7;
float: left;
margin: 0 -104px 0 0;
padding: 11px;
height: 60px;
}
#entry-author-info #author-description {
float: left;
margin: 0 0 0 104px;
}
#entry-author-info h2 {
color: #000;
font-weight: bold;
font-size: 100%;
margin-bottom: 0;
}
.entry-utility {
color: #888;
font-size: 12px;
line-height: 18px;
clear: both;
}
.entry-meta a,
.entry-utility a {
color: #888;
}
.entry-meta a:hover,
.entry-utility a:hover {
color: #FF4B33;
}
#content .video-player {
padding: 0;
}

/* Asides
————————————————————– */

.home #content .category-asides p {
font-size: 14px;
line-height: 20px;
margin-bottom: 10px;
margin-top:0;
}
.home .hentry.category-asides {
padding: 0;
}
.home #content .category-asides .entry-content {
padding-top: 0;
}

/* ギャラリーの並べ方
————————————————————– */

.category-gallery {
margin-bottom: 48px;
}
.category-gallery h2 {
margin-top: 10px;
}
.category-gallery .entry-meta {
}
.category-gallery .size-thumbnail img {
border: 10px solid #f1f1f1;
margin-bottom: 0;
}
.category-gallery .gallery-thumb {
float: left;
margin-right:20px;
margin-top: -4px;
}
.home #content .category-gallery .entry-content p {
display: inline;
}
.home #content .category-gallery .entry-utility {
padding-top:4px;
}

/* 添付ファイルのページ
————————————————————– */

.entry-content .attachment img {
margin-bottom: 0;
}
.attachment .entry-content .entry-caption {
font-size: 140%;
margin-top: 24px;
}
.attachment .entry-content .nav-previous a:before {
content: ‘\2190&#92;&#48;0a0’;
}
.attachment .entry-content .nav-next a:after {
content: ‘&#92;&#48;0a0\2192’;
}

/* 画像
————————————————————– */

#content img {
margin: 0;
max-width: 640px;
}
#content .attachment img {
max-width: 900px;
}
#content .alignleft,
#content img.alignleft {
display: inline;
float: left;
margin-right: 24px;
margin-top: 4px;
}
#content .alignright,
#content img.alignright {
display: inline;
float: right;
margin-left: 24px;
margin-top: 4px;
}
#content .aligncenter,
#content img.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
}
#content img.alignleft,
#content img.alignright,
#content img.aligncenter {
margin-bottom: 12px;
}
#content .wp-caption {
background: #f1f1f1;
line-height: 18px;
text-align: center;
margin-bottom: 20px;
padding: 4px;
}
#content .wp-caption img {
margin: 5px 5px 0;
}
#content .wp-caption p.wp-caption-text {
margin: 5px;
color: #888;
font-size: 12px;
}
#content .wp-smiley {
margin:0;
}
#content .gallery {
margin: auto;
}
#content .gallery .gallery-item {
float: left;
margin-top: 0;
text-align: center;
width: 33%;
}
#content .gallery img {
border: 2px solid #cfcfcf;
}
#content .gallery .gallery-caption {
color: #888;
font-size: 12px;
margin: 0 0 12px;
}
#content .gallery dl {
margin: 0;
}
#content .gallery img {
border: 10px solid #f1f1f1;
}
#content .gallery br+br {
display: none;
}

/* =ナビゲーション
————————————————————– */

.navigation {
font-size: 12px;
line-height: 18px;
overflow: hidden;
color: #888;
}
.navigation a:link,
.navigation a:visited {
color: #888;
text-decoration: none;
}
.navigation a:active,
.navigation a:hover {
color: #FF4B33;
}
.nav-previous {
float: left;
width: 50%;
}
.nav-next {
float: right;
width: 50%;
text-align:right;
}
#nav-above {
margin: 0 0 18px 0;
}
#nav-above {
display: none;
}
.paged #nav-above,
.single #nav-above {
display: block;
}
#nav-below {
margin: -18px 0 0 0;
}

/* =コメント
————————————————————– */
#comments {
clear: both;
}
#comments .navigation {
padding: 0 0 18px 0;
}
h3#comments-title,
h3#reply-title {
color: #000;
font-weight: bold;
font-size: 20px;
margin-bottom: 0;
}
h3#comments-title {
padding: 24px 0;
}
.commentlist {
list-style: none;
margin: 0;
}
.commentlist li.comment {
border-bottom: 1px solid #e7e7e7;
line-height: 24px;
margin: 0 0 24px 0;
padding: 0 0 0 56px;
position: relative;
}
.commentlist li:last-child {
border-bottom:none;
margin-bottom:0;
}
#comments .comment-body ul,
#comments .comment-body ol {
margin-bottom: 18px;
}
#comments .comment-body p:last-child {
margin-bottom: 6px;
}
#comments .comment-body blockquote p:last-child {
margin-bottom: 24px;
}
.commentlist ol {
list-style: decimal;
}
.commentlist .avatar {
position: absolute;
top: 4px;
left: 0;
}
.comment-author {
}
.comment-author cite {
color: #000;
font-style: normal;
font-weight: bold;
}
.comment-author .says {
font-style: italic;
}
.comment-meta {
font-size: 12px;
margin: 0 0 18px 0;
}
.comment-meta a:link,
.comment-meta a:visited {
color: #888;
text-decoration: none;
}
.comment-meta a:active,
.comment-meta a:hover {
color: #FF4B33;
}
.commentlist .even {
}
.commentlist .bypostauthor {
}
.reply {
font-size: 12px;
padding: 0 0 24px 0;
}
.reply a,
a.comment-edit-link {
color: #888;
}
.reply a:hover,
a.comment-edit-link:hover {
color: #FF4B33;
}
.commentlist .children {
list-style: none;
margin: 0;
}
.commentlist .children li {
border: none;
margin: 0;
}
.nopassword,
.nocomments {
display: none;
}
#comments .pingback {
margin-bottom: 18px;
padding-bottom: 18px;
border-bottom: 1px solid #e7e7e7;
}
.commentlist li.comment+li.pingback {
margin-top: -6px;
}
#comments .pingback p {
color: #888;
font-size: 12px;
line-height: 18px;
display:block;
margin: 0;
}
#comments .pingback .url {
font-style: italic;
font-size: 13px;
}

/* コメントフォーム */
input[type=submit] {
color: #333;
}
#respond {
margin: 24px 0;
border-top: 1px solid #e7e7e7;
overflow: hidden;
position: relative;
}
#respond p {
margin: 0;
}
#respond .comment-notes {
margin-bottom: 1em;
}
.form-allowed-tags {
line-height: 1em;
}
.children #respond {
margin: 0 48px 0 0;
}
h3#reply-title {
margin: 18px 0;
}
#comments-list #respond {
margin: 0 0 18px 0;
}
#comments-list ul #respond {
margin: 0;
}
#cancel-comment-reply-link {
font-size: 12px;
line-height: 18px;
font-weight: normal;
}
#respond .required {
color:#FF4B33;
font-weight:bold;
}
#respond label {
color: #888;
font-size: 12px;
}
#respond input {
margin:0 0 9px;
width:98%;
}
#respond textarea {
width:98%;
}
#respond .form-allowed-tags {
color: #888;
font-size: 12px;
line-height: 18px;
}
#respond .form-allowed-tags code {
font-size: 11px;
}
#respond .form-submit {
margin: 12px 0;
}
#respond .form-submit input {
width: auto;
font-size: 14px;
}

/* =ウィジェットエリア
————————————————————– */

.widget-area ul {
list-style: none;
margin-left: 0;
}
.widget-area ul ul {
list-style: square;
margin-left: 1.3em;
}
.widget_search #s { /* この指定で検索の入力フォームを列からはみ出ないようにしています。 */
width: 60%;
}
.widget_search label {
display:none;
}
.widget-container {
margin: 0 0 18px 0;
}
.widget-title {
color: #222;
font-weight: bold;
}
.widget-area a:link,
.widget-area a:visited {
text-decoration: none;
}
.widget-area a:active,
.widget-area a:hover {
text-decoration: underline;
}
.widget-area .entry-meta {
font-size: 11px;
}
#wp_tag_cloud div {
line-height: 1.6em;
}
#wp-calendar {
width:100%;
}
#wp-calendar caption {
font-weight: bold;
color: #222;
text-align: left;
font-size:14px;
padding-bottom: 4px;
}
#wp-calendar thead {
font-size:11px;
}
#wp-calendar thead th {
}
#wp-calendar tbody {
color: #aaa;
}
#wp-calendar tbody td {
padding: 3px 0 2px;
background: #f5f5f5;
border:1px solid #fff;
text-align: center;
}
#wp-calendar tbody .pad {
background: none;
}
#wp-calendar tfoot #next {
text-align: right;
}
.widget_rss a.rsswidget {
color: #000;
}
.widget_rss a.rsswidget:hover {
color: #FF4B33;
}
.widget_rss .widget-title img {
height: 11px;
width: 11px;
}

/* メインサイドバー */
#main .widget-area ul {
margin-left: 0;
padding: 0 20px 0 0;
}
#main .widget-area ul ul {
border: none;
margin-left: 1.3em;
padding: 0;
}
#primary {
}
#secondary {
}

/* フッターウィジェットエリア */
#footer-widget-area {
}

/* =フッター
————————————————————– */

#footer {
margin-bottom: 20px;
}
#colophon {
border-top: 4px solid #000;
margin-top: -4px;
padding: 18px 0;
overflow: hidden;
}
#site-info {
font-weight: bold;
}
#site-info a {
color: #000;
text-decoration: none;
}
#site-generator {
position: relative;
font-style: italic;
}
#site-generator a {
color: #666;
display:inline-block;
text-decoration: none;
background: url(images/wordpress.png) center left no-repeat;
padding-left: 20px;
line-height: 16px;
}
#site-generator a:hover {
text-decoration: underline;
}
img#wpstats {
display:block;
margin: 0 auto 10px;
}

/* Mobile Safari ( iPad, iPhone and iPod Touch )
————————————————————– */

pre {
-webkit-text-size-adjust: 140%;
}
code {
-webkit-text-size-adjust: 160%;
}
#access,
.entry-meta,
.entry-utility,
.navigation,
.widget-area {
-webkit-text-size-adjust: 120%;
}
#site-description {
-webkit-text-size-adjust: none;
}

/* =印刷用スタイル
————————————————————– */

@media print {
body {
background:none !important;
}
#wrapper {
float: none !important;
clear: both !important;
display: block !important;
position: relative !important;
}
#header {
border-bottom: 2pt solid #000;
padding-bottom: 18pt;
}
#colophon {
border-top: 2pt solid #000;
}
#site-title,
#site-description {
float: none;
margin: 0;
padding:0;
line-height: 1.4em;
}
#site-title {
font-size: 13pt;
}
.entry-content {
font-size: 14pt;
line-height: 1.6em;
}
.entry-title {
font-size: 21pt;
}
#access,
#branding img,
#respond,
.comment-edit-link,
.edit-link,
.navigation,
.page-link,
.widget-area {
display: none !important;
}
#container,
#header,
#footer {
width: 100%;
margin: 0;
}
#content,
.one-column #content {
width: 100%;
margin: 24pt 0 0;
}
.wp-caption p {
font-size: 11pt;
}
#site-info,
#site-generator {
float: none;
width: auto;
}
#colophon {
width: auto;
}
img#wpstats {
display:none
}
#site-generator a {
padding: 0;
margin: 0;
}
#entry-author-info {
border: 1px solid #e7e7e7;
}
#main {
display:inline;
}
.home .sticky {
border: none;
}
}
[/css]

tag.php

[php]
<?php
/**
* タグ別アーカイブを表示するためのテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?>

<div id="container">
<div id="content" role="main">

<h1 class="page-title"><?php
printf( __( ‘Tag Archives: %s’, ‘twentyten’ ), ‘<span>’ . single_tag_title( ”, false ) . ‘</span>’ );
?></h1>

<?php
/* タグ別アーカイブが記事を出力するためにループを走らせます。
* 子テーマでこれを上書きしたい場合は、
* loop-tag.php ファイルを含めると、こちらが使われます。
*/
get_template_part( ‘loop’, ‘tag’ );
?>
</div><!– #content –>
</div><!– #container –>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]


“Twenty Ten テーマのコード内の説明を日本語化しました” への8件のフィードバック

  1. テーマを改造してみたり

    今日は、デザインを変更してみよう! と考え、テーマをいじってみました。 いじったのは現在使っているwp.Vicunaではなく、現在のWordPressのデフォルトテーマである、Twenty Tenです。 で、…

フォームは コメントしてほしそうに こちらを見ている……!

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

%d人のブロガーが「いいね」をつけました。