Twenty Eleven テーマ内の説明を日本語訳しました


WordPress 3.2 より『Twenty Eleven』が新しいデフォルトテーマとなりましたが、WordPress 3.2.x 日本語版でもソースコードに併記されている説明は諸々の理由で英語のままとなっています。 『Twenty Eleven』は 3.2 の特徴となる機能がいくつも盛り込まれているのに加え、WordPress のテーマを理解する上でとても良いお手本となるものだと思いますので、より理解が深まることも願って、 Twenty Ten に引き続き日本語訳をしてみました。 (ただし例によって突貫工事+眠気と闘いながら訳しましたので、間違い等ありましたらこっそり教えてくださいね^^;)

翻訳ファイル名一覧

twentyeleven
404.php
archive.php
author.php
category.php
comments.php
content-aside.php
content-featured.php
content-gallery.php
content-image.php
content-intro.php
content-link.php
content-page.php
content-quote.php
content-single.php
content-status.php
content.php
footer.php
functions.php
header.php
image.php
index.php
page.php
search.php
searchform.php
showcase.php
sidebar-footer.php
sidebar-page.php
sidebar.php
single.php
tag.php
languages
style.css
colors
 └dark.css(未翻訳)
images
inc
 ├theme-options.css(翻訳箇所なし)
 ├theme-options.js(翻訳箇所なし)
 ├theme-options.php(未翻訳)
 ├widgets.php(未翻訳)
 ├images
js
├editor-style.css(未翻訳)
├editor-style-rtl.css(未翻訳)
├rtl.css(未翻訳)
license.txt
└readme.txt(翻訳箇所なし)

404.php

[php]
<?php
/**
* 404 (Not Found) ページを表示するテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />get_header(); ?><br /><br /> <div id="primary">
<div id="content" role="main"><br /><br /> <article id="post-0" class="post error404 not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( ‘This is somewhat embarrassing, isn&rsquo;t it?’, ‘twentyeleven’ ); ?></h1>
</header><br /><br /> <div class="entry-content">
<p><?php _e( ‘It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching, or one of the links below, can help.’, ‘twentyeleven’ ); ?></p><br /><br /> <?php get_search_form(); ?><br /><br /> <?php the_widget( ‘WP_Widget_Recent_Posts’, array( ‘number’ => 10 ), array( ‘widget_id’ => ‘404’ ) ); ?><br /><br /> <div class="widget">
<h2 class="widgettitle"><?php _e( ‘Most Used Categories’, ‘twentyeleven’ ); ?></h2>
<ul>
<?php wp_list_categories( array( ‘orderby’ => ‘count’, ‘order’ => ‘DESC’, ‘show_count’ => 1, ‘title_li’ => ”, ‘number’ => 10 ) ); ?>
</ul>
</div><br /><br /> <?php
/* 翻訳者へ: %1$s: スマイル */
$archive_content = ‘<p>’ . sprintf( __( ‘Try looking in the monthly archives. %1$s’, ‘twentyeleven’ ), convert_smilies( ‘:)’ ) ) . ‘</p>’;
the_widget( ‘WP_Widget_Archives’, array(‘count’ => 0 , ‘dropdown’ => 1 ), array( ‘after_title’ => ‘</h2>’.$archive_content ) );
?><br /><br /> <?php the_widget( ‘WP_Widget_Tag_Cloud’ ); ?><br /><br /> </div><!– .entry-content –>
</article><!– #post-0 –><br /><br /> </div><!– #content –>
</div><!– #primary –><br /><br /><?php get_footer(); ?>
[/php]

archive.php

[php]
<?php
/**
* アーカイブページを表示するテンプレート
*
* 特段クエリにマッチするものがない場合にアーカイブタイプのページを表示するのに使用されます。
* たとえば、date.php ファイルが存在しない場合に日付ベースのページをまとめます。
*
* 詳しくは: http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />get_header(); ?><br /><br /> <section id="primary">
<div id="content" role="main"><br /><br /> <?php if ( have_posts() ) : ?><br /><br /> <header class="page-header">
<h1 class="page-title">
<?php if ( is_day() ) : ?>
<?php printf( __( ‘Daily Archives: %s’, ‘twentyeleven’ ), ‘<span>’ . get_the_date() . ‘</span>’ ); ?>
<?php elseif ( is_month() ) : ?>
<?php printf( __( ‘Monthly Archives: %s’, ‘twentyeleven’ ), ‘<span>’ . get_the_date( ‘F Y’ ) . ‘</span>’ ); ?>
<?php elseif ( is_year() ) : ?>
<?php printf( __( ‘Yearly Archives: %s’, ‘twentyeleven’ ), ‘<span>’ . get_the_date( ‘Y’ ) . ‘</span>’ ); ?>
<?php else : ?>
<?php _e( ‘Blog Archives’, ‘twentyeleven’ ); ?>
<?php endif; ?>
</h1>
</header><br /><br /> <?php twentyeleven_content_nav( ‘nav-above’ ); ?><br /><br /> <?php /* ループを開始 */ ?>
<?php while ( have_posts() ) : the_post(); ?><br /><br /> <?php
/* コンテンツ用の投稿フォーマットテンプレートをインクルードします。
* これを子テーマで上書きしたい場合は、
* content-___.php ( ___ の部分は投稿フォーマット名が入る) というファイルを含めれば、かわりにそのファイルが使われます。
*/
get_template_part( ‘content’, get_post_format() );
?><br /><br /> <?php endwhile; ?><br /><br /> <?php twentyeleven_content_nav( ‘nav-below’ ); ?><br /><br /> <?php else : ?><br /><br /> <article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( ‘Nothing Found’, ‘twentyeleven’ ); ?></h1>
</header><!– .entry-header –><br /><br /> <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.’, ‘twentyeleven’ ); ?></p>
<?php get_search_form(); ?>
</div><!– .entry-content –>
</article><!– #post-0 –><br /><br /> <?php endif; ?><br /><br /> </div><!– #content –>
</section><!– #primary –><br /><br /><?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

author.php

[php]
<?php
/**
* 作成者アーカイブページを表示するテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />get_header(); ?><br /><br /> <section id="primary">
<div id="content" role="main"><br /><br /> <?php if ( have_posts() ) : ?><br /><br /> <?php
/* 最初の記事を待ち行列に並べます。こうして
* 作成者が誰であるか分かるのです。
*
* rewind_posts() へのコールで適切に
* ループを走らせられるように後でこれをリセットします。
*/
the_post();
?><br /><br /> <header class="page-header">
<h1 class="page-title author"><?php printf( __( ‘Author Archives: %s’, ‘twentyeleven’ ), ‘<span class="vcard"><a class="url fn n" href="’ . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . ‘" title="’ . esc_attr( get_the_author() ) . ‘" rel="me">’ . get_the_author() . ‘</a></span>’ ); ?></h1>
</header><br /><br /> <?php
/* 先に the_post() を呼んでいるので、
* 適切に全部のループを走らせられるように、
* ループを最初まで巻き戻す必要があります。
*/
rewind_posts();
?><br /><br /> <?php twentyeleven_content_nav( ‘nav-above’ ); ?><br /><br /> <?php
// ユーザが説明を記入している場合、エントリーに略歴を表示します。
if ( get_the_author_meta( ‘description’ ) ) : ?>
<div id="author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( ‘user_email’ ), apply_filters( ‘twentyeleven_author_bio_avatar_size’, 60 ) ); ?>
</div><!– #author-avatar –>
<div id="author-description">
<h2><?php printf( __( ‘About %s’, ‘twentyeleven’ ), get_the_author() ); ?></h2>
<?php the_author_meta( ‘description’ ); ?>
</div><!– #author-description –>
</div><!– #entry-author-info –>
<?php endif; ?><br /><br /> <?php /* ループを開始 */ ?>
<?php while ( have_posts() ) : the_post(); ?><br /><br /> <?php
/* コンテンツ用の投稿フォーマットテンプレートをインクルードします。
* これを子テーマで上書きしたい場合は、
* content-___.php ( ___ の部分は投稿フォーマット名が入る) というファイルを含めれば、かわりにそのファイルが使われます。
*/
get_template_part( ‘content’, get_post_format() );
?><br /><br /> <?php endwhile; ?><br /><br /> <?php twentyeleven_content_nav( ‘nav-below’ ); ?><br /><br /> <?php else : ?><br /><br /> <article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( ‘Nothing Found’, ‘twentyeleven’ ); ?></h1>
</header><!– .entry-header –><br /><br /> <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.’, ‘twentyeleven’ ); ?></p>
<?php get_search_form(); ?>
</div><!– .entry-content –>
</article><!– #post-0 –><br /><br /> <?php endif; ?><br /><br /> </div><!– #content –>
</section><!– #primary –><br /><br /><?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

category.php

[php]
<?php
/**
* カテゴリーアーカイブを表示するテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />get_header(); ?><br /><br /> <section id="primary">
<div id="content" role="main"><br /><br /> <?php if ( have_posts() ) : ?><br /><br /> <header class="page-header">
<h1 class="page-title"><?php
printf( __( ‘Category Archives: %s’, ‘twentyeleven’ ), ‘<span>’ . single_cat_title( ”, false ) . ‘</span>’ );
?></h1><br /><br /> <?php
$category_description = category_description();
if ( ! empty( $category_description ) )
echo apply_filters( ‘category_archive_meta’, ‘<div class="category-archive-meta">’ . $category_description . ‘</div>’ );
?>
</header><br /><br /> <?php twentyeleven_content_nav( ‘nav-above’ ); ?><br /><br /> <?php /* ループを開始 */ ?>
<?php while ( have_posts() ) : the_post(); ?><br /><br /> <?php
/* コンテンツ用の投稿フォーマットテンプレートをインクルードします。
* これを子テーマで上書きしたい場合は、
* content-___.php ( ___ の部分は投稿フォーマット名が入る) というファイルを含めれば、かわりにそのファイルが使われます。
*/
get_template_part( ‘content’, get_post_format() );
?><br /><br /> <?php endwhile; ?><br /><br /> <?php twentyeleven_content_nav( ‘nav-below’ ); ?><br /><br /> <?php else : ?><br /><br /> <article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( ‘Nothing Found’, ‘twentyeleven’ ); ?></h1>
</header><!– .entry-header –><br /><br /> <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.’, ‘twentyeleven’ ); ?></p>
<?php get_search_form(); ?>
</div><!– .entry-content –>
</article><!– #post-0 –><br /><br /> <?php endif; ?><br /><br /> </div><!– #content –>
</section><!– #primary –><br /><br /><?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

comments.php

[php]
<?php
/**
* コメントを表示するテンプレート
*
* いまあるコメントとコメントフォームの両方を含むページのエリア。
* 実際のコメント表示は
* functions.php ファイルにある twentyeleven_comment へのコールバック
* によって処理されます。
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 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.’, ‘twentyeleven’ ); ?></p>
</div><!– #comments –>
<?php
/* comments.php の残りが処理されるのを停止します。
* でないと、スクリプトを丸ごと殺せず、つまり依然として
* テンプレートを完全に読み込まなくてはならないからです。
*/
return;
endif;
?><br /><br /> <?php // ここは編集することができます。このコメントを含めて! ?><br /><br /> <?php if ( have_comments() ) : ?>
<h2 id="comments-title">
<?php
printf( _n( ‘One thought on &ldquo;%2$s&rdquo;’, ‘%1$s thoughts on &ldquo;%2$s&rdquo;’, get_comments_number(), ‘twentyeleven’ ),
number_format_i18n( get_comments_number() ), ‘<span>’ . get_the_title() . ‘</span>’ );
?>
</h2><br /><br /> <?php if ( get_comment_pages_count() > 1 && get_option( ‘page_comments’ ) ) : // 検索するためにコメントがありますか? ?>
<nav id="comment-nav-above">
<h1 class="assistive-text"><?php _e( ‘Comment navigation’, ‘twentyeleven’ ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( ‘&larr; Older Comments’, ‘twentyeleven’ ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( ‘Newer Comments &rarr;’, ‘twentyeleven’ ) ); ?></div>
</nav>
<?php endif; // コメントナビゲージョンのためのチェック ?><br /><br /> <ol class="commentlist">
<?php
/* コメントをループし、並べます。コメントをフォーマットするため
* wp_list_comments() に twentyeleven_comment() を使うようにさせます。
* 子テーマでこれを上書きしたいなら、
* twentyeleven_comment() を定義すると、それが代わりに使われます。
* 詳しくは twentyeleven/functions.php の twentyeleven_comment() を見てください。
*/
wp_list_comments( array( ‘callback’ => ‘twentyeleven_comment’ ) );
?>
</ol><br /><br /> <?php if ( get_comment_pages_count() > 1 && get_option( ‘page_comments’ ) ) : // 検索するためにコメントがありますか? ?>
<nav id="comment-nav-below">
<h1 class="assistive-text"><?php _e( ‘Comment navigation’, ‘twentyeleven’ ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( ‘&larr; Older Comments’, ‘twentyeleven’ ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( ‘Newer Comments &rarr;’, ‘twentyeleven’ ) ); ?></div>
</nav>
<?php endif; // コメントナビゲーションのためのチェック ?><br /><br /> <?php
/* コメントが全くない場合や、コメントが閉じられている場合、ささやかな注釈を残しましょう、ですよね?
* けれど、コメントをサポートしないページや投稿タイプには注釈を必要としません。
*/
elseif ( ! comments_open() && ! is_page() && post_type_supports( get_post_type(), ‘comments’ ) ) :
?>
<p class="nocomments"><?php _e( ‘Comments are closed.’, ‘twentyeleven’ ); ?></p>
<?php endif; ?><br /><br /> <?php comment_form(); ?><br /><br /></div><!– #comments –>
[/php]

content-aside.php

[php]
<?php
/**
* インデックス・アーカイブページに投稿フォーマット – アサイドの投稿を表示するテンプレート
*
* 詳しくは: http://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><br /><br /> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( ‘Aside’, ‘twentyeleven’ ); ?></h3>
</hgroup><br /><br /> <?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Reply’, ‘twentyeleven’ ) . ‘</span>’, _x( ‘1’, ‘comments number’, ‘twentyeleven’ ), _x( ‘%’, ‘comments number’, ‘twentyeleven’ ) ); ?>
</div>
<?php endif; ?>
</header><!– .entry-header –><br /><br /> <?php if ( 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>’, ‘twentyeleven’ ) ); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –>
<?php endif; ?><br /><br /> <footer class="entry-meta">
<?php twentyeleven_posted_on(); ?>
<?php if ( comments_open() ) : ?>
<span class="sep"> | </span>
<span class="comments-link"><?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Leave a reply’, ‘twentyeleven’ ) . ‘</span>’, __( ‘<b>1</b> Reply’, ‘twentyeleven’ ), __( ‘<b>%</b> Replies’, ‘twentyeleven’ ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</footer><!– #entry-meta –>
</article><!– #post-<?php the_ID(); ?> –>
[/php]

content-featured.php

[php]
<?php
/**
* showcase.php 固定ページテンプレートで特集するコンテンツを表示するテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />global $feature_class;
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( $feature_class ); ?>>
<header class="entry-header">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2><br /><br /> <div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!– .entry-meta –>
</header><!– .entry-header –><br /><br /> <div class="entry-summary">
<?php the_excerpt(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –><br /><br /> <footer class="entry-meta">
<?php
/* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
$tag_list = get_the_tag_list( ”, __( ‘, ‘, ‘twentyeleven’ ) );
if ( ” != $tag_list ) {
$utility_text = __( ‘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>.’, ‘twentyeleven’ );
} else {
$utility_text = __( ‘This entry was posted in %1$s. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.’, ‘twentyeleven’ );
}
printf(
$utility_text,
/* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
get_the_category_list( __( ‘, ‘, ‘twentyeleven’ ) ),
$tag_list,
esc_url( get_permalink() ),
the_title_attribute( ‘echo=0’ )
);
?><br /><br /> <?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</footer><!– .entry-meta –>
</article><!– #post-<?php the_ID(); ?> –>
[/php]

content-gallery.php

[php]
<?php
/**
* インデックス・アーカイブページに投稿フォーマット – ギャラリーの投稿を表示するテンプレート
*
* 詳しくは: http://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><br /><br /><article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( ‘Gallery’, ‘twentyeleven’ ); ?></h3>
</hgroup><br /><br /> <div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!– .entry-meta –>
</header><!– .entry-header –><br /><br /> <?php if ( is_search() ) : // 検索用に抜粋のみ表示します ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!– .entry-summary –>
<?php else : ?>
<div class="entry-content">
<?php if ( post_password_required() ) : ?>
<?php the_content( __( ‘Continue reading <span class="meta-nav">&rarr;</span>’, ‘twentyeleven’ ) ); ?><br /><br /> <?php else : ?>
<?php
$images = get_children( array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’, ‘numberposts’ => 999 ) );
if ( $images ) :
$total_images = count( $images );
$image = array_shift( $images );
$image_img_tag = wp_get_attachment_image( $image->ID, ‘thumbnail’ );
?><br /><br /> <figure class="gallery-thumb">
<a href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
</figure><!– .gallery-thumb –><br /><br /> <p><em><?php printf( _n( ‘This gallery contains <a %1$s>%2$s photo</a>.’, ‘This gallery contains <a %1$s>%2$s photos</a>.’, $total_images, ‘twentyeleven’ ),
‘href="’ . esc_url( get_permalink() ) . ‘" title="’ . sprintf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ) . ‘" rel="bookmark"’,
number_format_i18n( $total_images )
); ?></em></p>
<?php endif; ?>
<?php the_excerpt(); ?>
<?php endif; ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –>
<?php endif; ?><br /><br /> <footer class="entry-meta">
<?php $show_sep = false; ?>
<?php
/* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
$categories_list = get_the_category_list( __( ‘, ‘, ‘twentyeleven’ ) );
if ( $categories_list ):
?>
<span class="cat-links">
<?php printf( __( ‘<span class="%1$s">Posted in</span> %2$s’, ‘twentyeleven’ ), ‘entry-utility-prep entry-utility-prep-cat-links’, $categories_list );
$show_sep = true; ?>
</span>
<?php endif; // End if categories ?>
<?php
/* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
$tags_list = get_the_tag_list( ”, __( ‘, ‘, ‘twentyeleven’ ) );
if ( $tags_list ):
if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="tag-links">
<?php printf( __( ‘<span class="%1$s">Tagged</span> %2$s’, ‘twentyeleven’ ), ‘entry-utility-prep entry-utility-prep-tag-links’, $tags_list );
$show_sep = true; ?>
</span>
<?php endif; // End if $tags_list ?><br /><br /> <?php if ( comments_open() ) : ?>
<?php if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="comments-link"><?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Leave a Reply’, ‘twentyeleven’ ) . ‘</span>’, __( ‘<b>1</b> Reply’, ‘twentyeleven’ ), __( ‘<b>%</b> Replies’, ‘twentyeleven’ ) ); ?></span>
<?php endif; // End if comments_open() ?><br /><br /> <?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</footer><!– #entry-meta –>
</article><!– #post-<?php the_ID(); ?> –>
[/php]

content-image.php

[php]
<?php
/**
* インデックス・アーカイブページに投稿フォーマット – 画像の投稿を表示するテンプレート
*
* 詳しくは: http://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( ‘indexed’ ); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( ‘Image’, ‘twentyeleven’ ); ?></h3>
</hgroup><br /><br /> <?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( ‘<span class="leave-reply">’ . __( "Reply", ‘twentyeleven’ ) . ‘</span>’, _x( ‘1’, ‘comments number’, ‘twentyeleven’ ), _x( ‘%’, ‘comments number’, ‘twentyeleven’ ) ); ?>
</div>
<?php endif; ?>
</header><!– .entry-header –><br /><br /> <div class="entry-content">
<?php the_content( __( ‘Continue reading <span class="meta-nav">&rarr;</span>’, ‘twentyeleven’ ) ); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –><br /><br /> <footer class="entry-meta">
<div class="entry-meta">
<?php
printf( __( ‘<a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s" rel="author">%6$s</a></span></span>’, ‘twentyeleven’ ),
esc_url( get_permalink() ),
get_the_date( ‘c’ ),
get_the_date(),
esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
sprintf( esc_attr__( ‘View all posts by %s’, ‘twentyeleven’ ), get_the_author() ),
get_the_author()
);
?>
</div><!– .entry-meta –>
<div class="entry-meta">
<?php
/* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
$categories_list = get_the_category_list( __( ‘, ‘, ‘twentyeleven’ ) );
if ( $categories_list ):
?>
<span class="cat-links">
<?php printf( __( ‘<span class="%1$s">Posted in</span> %2$s’, ‘twentyeleven’ ), ‘entry-utility-prep entry-utility-prep-cat-links’, $categories_list ); ?>
</span>
<?php endif; // End if categories ?>
<?php
/* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
$tags_list = get_the_tag_list( ”, __( ‘, ‘, ‘twentyeleven’ ) );
if ( $tags_list ): ?>
<span class="tag-links">
<?php printf( __( ‘<span class="%1$s">Tagged</span> %2$s’, ‘twentyeleven’ ), ‘entry-utility-prep entry-utility-prep-tag-links’, $tags_list ); ?>
</span>
<?php endif; // End if $tags_list ?><br /><br /> <?php if ( comments_open() ) : ?>
<span class="comments-link"><?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Reply’, ‘twentyeleven’ ) . ‘</span>’, __( ‘<strong>1</strong> Reply’, ‘twentyeleven’ ), __( ‘<strong>%</strong> Replies’, ‘twentyeleven’ ) ); ?></span>
<?php endif; // End if comments_open() ?>
</div><!– .entry-meta –><br /><br /> <?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</footer><!– #entry-meta –>
</article><!– #post-<?php the_ID(); ?> –>
[/php]

content-intro.php

[php]
<?php
/**
* showcase.php 固定ページテンプレート内でページコンテンツを表示するテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><br /><br /><article id="post-<?php the_ID(); ?>" <?php post_class( ‘intro’ ); ?>>
<header class="entry-header">
<h2 class="entry-title"><?php the_title(); ?></h2>
</header><!– .entry-header –><br /><br /> <div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
<?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</div><!– .entry-content –>
</article><!– #post-<?php the_ID(); ?> –>
[/php]

content-link.php

[php]
<?php
/**
* インデックス・アーカイブページに投稿フォーマット – リンクの投稿を表示するテンプレート
*
* 詳しくは: http://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><br /><br /> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( ‘Link’, ‘twentyeleven’ ); ?></h3>
</hgroup><br /><br /> <?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Reply’, ‘twentyeleven’ ) . ‘</span>’, _x( ‘1’, ‘comments number’, ‘twentyeleven’ ), _x( ‘%’, ‘comments number’, ‘twentyeleven’ ) ); ?>
</div>
<?php endif; ?>
</header><!– .entry-header –><br /><br /> <?php if ( 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>’, ‘twentyeleven’ ) ); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –>
<?php endif; ?><br /><br /> <footer class="entry-meta">
<?php twentyeleven_posted_on(); ?>
<?php if ( comments_open() ) : ?>
<span class="sep"> | </span>
<span class="comments-link"><?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Leave a reply’, ‘twentyeleven’ ) . ‘</span>’, __( ‘<b>1</b> Reply’, ‘twentyeleven’ ), __( ‘<b>%</b> Replies’, ‘twentyeleven’ ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</footer><!– #entry-meta –>
</article><!– #post-<?php the_ID(); ?> –>
[/php]

content-page.php

[php]
<?php
/**
* page.php 内でページコンテンツを表示するのに使用されるテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><br /><br /><article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!– .entry-header –><br /><br /> <div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –>
<footer class="entry-meta">
<?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</footer><!– .entry-meta –>
</article><!– #post-<?php the_ID(); ?> –>
[/php]

content-quote.php

[php]
<?php
/**
* コンテンツを表示するためのデフォルトテンプレート(編集注:投稿フォーマット – 引用の投稿を表示するテンプレート…では…?)
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><br /><br /> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( ‘Quote’, ‘twentyeleven’ ); ?></h3>
</hgroup><br /><br /> <div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!– .entry-meta –><br /><br /> <?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Reply’, ‘twentyeleven’ ) . ‘</span>’, _x( ‘1’, ‘comments number’, ‘twentyeleven’ ), _x( ‘%’, ‘comments number’, ‘twentyeleven’ ) ); ?>
</div>
<?php endif; ?>
</header><!– .entry-header –><br /><br /> <?php if ( 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>’, ‘twentyeleven’ ) ); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –>
<?php endif; ?><br /><br /> <footer class="entry-meta">
<?php $show_sep = false; ?>
<?php
/* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
$categories_list = get_the_category_list( __( ‘, ‘, ‘twentyeleven’ ) );
if ( $categories_list ):
?>
<span class="cat-links">
<?php printf( __( ‘<span class="%1$s">Posted in</span> %2$s’, ‘twentyeleven’ ), ‘entry-utility-prep entry-utility-prep-cat-links’, $categories_list );
$show_sep = true; ?>
</span>
<?php endif; // End if categories ?>
<?php
/* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
$tags_list = get_the_tag_list( ”, __( ‘, ‘, ‘twentyeleven’ ) );
if ( $tags_list ):
if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="tag-links">
<?php printf( __( ‘<span class="%1$s">Tagged</span> %2$s’, ‘twentyeleven’ ), ‘entry-utility-prep entry-utility-prep-tag-links’, $tags_list );
$show_sep = true; ?>
</span>
<?php endif; // End if $tags_list ?><br /><br /> <?php if ( comments_open() ) : ?>
<?php if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="comments-link"><?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Leave a reply’, ‘twentyeleven’ ) . ‘</span>’, __( ‘<b>1</b> Reply’, ‘twentyeleven’ ), __( ‘<b>%</b> Replies’, ‘twentyeleven’ ) ); ?></span>
<?php endif; // End if comments_open() ?><br /><br /> <?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</footer><!– #entry-meta –>
</article><!– #post-<?php the_ID(); ?> –><br /><br />[/php]

content-single.php

[php]
<?php
/**
* single.php テンプレート内でコンテンツを表示するテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><br /><br /><article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1><br /><br /> <?php if ( ‘post’ == get_post_type() ) : ?>
<div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!– .entry-meta –>
<?php endif; ?>
</header><!– .entry-header –><br /><br /> <div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –><br /><br /> <footer class="entry-meta">
<?php
/* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
$categories_list = get_the_category_list( __( ‘, ‘, ‘twentyeleven’ ) );<br /><br /> /* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
$tag_list = get_the_tag_list( ”, __( ‘, ‘, ‘twentyeleven’ ) );
if ( ” != $tag_list ) {
$utility_text = __( ‘This entry was posted in %1$s and tagged %2$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.’, ‘twentyeleven’ );
} elseif ( ” != $categories_list ) {
$utility_text = __( ‘This entry was posted in %1$s by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.’, ‘twentyeleven’ );
} else {
$utility_text = __( ‘This entry was posted by <a href="%6$s">%5$s</a>. Bookmark the <a href="%3$s" title="Permalink to %4$s" rel="bookmark">permalink</a>.’, ‘twentyeleven’ );
}<br /><br /> printf(
$utility_text,
$categories_list,
$tag_list,
esc_url( get_permalink() ),
the_title_attribute( ‘echo=0’ ),
get_the_author(),
esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) )
);
?>
<?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?><br /><br /> <?php if ( get_the_author_meta( ‘description’ ) && is_multi_author() ) : // ユーザが説明を記入している場合、エントリーに略歴を表示します。 ?>
<div id="author-info">
<div id="author-avatar">
<?php echo get_avatar( get_the_author_meta( ‘user_email’ ), apply_filters( ‘twentyeleven_author_bio_avatar_size’, 68 ) ); ?>
</div><!– #author-avatar –>
<div id="author-description">
<h2><?php printf( esc_attr__( ‘About %s’, ‘twentyeleven’ ), get_the_author() ); ?></h2>
<?php the_author_meta( ‘description’ ); ?>
<div id="author-link">
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ); ?>" rel="author">
<?php printf( __( ‘View all posts by %s <span class="meta-nav">&rarr;</span>’, ‘twentyeleven’ ), get_the_author() ); ?>
</a>
</div><!– #author-link –>
</div><!– #author-description –>
</div><!– #entry-author-info –>
<?php endif; ?>
</footer><!– .entry-meta –>
</article><!– #post-<?php the_ID(); ?> –>
[/php]

content-status.php

[php]
<?php
/**
* インデックス・アーカイブページに投稿フォーマット – ステータスの投稿を表示するテンプレート
*
* 詳しくは: http://codex.wordpress.org/Post_Formats
*
* @package WordPress
* @subpackage Twenty_Eleven
*/
?><br /><br /> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( ‘Status’, ‘twentyeleven’ ); ?></h3>
</hgroup><br /><br /> <?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Reply’, ‘twentyeleven’ ) . ‘</span>’, _x( ‘1’, ‘comments number’, ‘twentyeleven’ ), _x( ‘%’, ‘comments number’, ‘twentyeleven’ ) ); ?>
</div>
<?php endif; ?>
</header><!– .entry-header –><br /><br /> <?php if ( is_search() ) : // 検索用に抜粋のみ表示します ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!– .entry-summary –>
<?php else : ?>
<div class="entry-content">
<div class="avatar"><?php echo get_avatar( get_the_author_meta( ‘ID’ ), apply_filters( ‘twentyeleven_status_avatar’, ’65’ ) ); ?></div><br /><br /> <?php the_content( __( ‘Continue reading <span class="meta-nav">&rarr;</span>’, ‘twentyeleven’ ) ); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –>
<?php endif; ?><br /><br /> <footer class="entry-meta">
<?php twentyeleven_posted_on(); ?>
<?php if ( comments_open() ) : ?>
<span class="sep"> | </span>
<span class="comments-link"><?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Leave a reply’, ‘twentyeleven’ ) . ‘</span>’, __( ‘<b>1</b> Reply’, ‘twentyeleven’ ), __( ‘<b>%</b> Replies’, ‘twentyeleven’ ) ); ?></span>
<?php endif; ?>
<?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</footer><!– #entry-meta –>
</article><!– #post-<?php the_ID(); ?> –>
[/php]

content.php

[php]
<?php
/**
* コンテンツを表示するためのデフォルトテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><br /><br /> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( is_sticky() ) : ?>
<hgroup>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<h3 class="entry-format"><?php _e( ‘Featured’, ‘twentyeleven’ ); ?></h3>
</hgroup>
<?php else : ?>
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1>
<?php endif; ?><br /><br /> <?php if ( ‘post’ == get_post_type() ) : ?>
<div class="entry-meta">
<?php twentyeleven_posted_on(); ?>
</div><!– .entry-meta –>
<?php endif; ?><br /><br /> <?php if ( comments_open() && ! post_password_required() ) : ?>
<div class="comments-link">
<?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Reply’, ‘twentyeleven’ ) . ‘</span>’, _x( ‘1’, ‘comments number’, ‘twentyeleven’ ), _x( ‘%’, ‘comments number’, ‘twentyeleven’ ) ); ?>
</div>
<?php endif; ?>
</header><!– .entry-header –><br /><br /> <?php if ( 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>’, ‘twentyeleven’ ) ); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-content –>
<?php endif; ?><br /><br /> <footer class="entry-meta">
<?php $show_sep = false; ?>
<?php if ( ‘post’ == get_post_type() ) : // 検索結果のページではカテゴリーとタグのテキストを隠す ?>
<?php
/* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
$categories_list = get_the_category_list( __( ‘, ‘, ‘twentyeleven’ ) );
if ( $categories_list ):
?>
<span class="cat-links">
<?php printf( __( ‘<span class="%1$s">Posted in</span> %2$s’, ‘twentyeleven’ ), ‘entry-utility-prep entry-utility-prep-cat-links’, $categories_list );
$show_sep = true; ?>
</span>
<?php endif; // End if categories ?>
<?php
/* 翻訳者へ: リストされた項目の間で使われ、コンマの後にひとつスペースがあります */
$tags_list = get_the_tag_list( ”, __( ‘, ‘, ‘twentyeleven’ ) );
if ( $tags_list ):
if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="tag-links">
<?php printf( __( ‘<span class="%1$s">Tagged</span> %2$s’, ‘twentyeleven’ ), ‘entry-utility-prep entry-utility-prep-tag-links’, $tags_list );
$show_sep = true; ?>
</span>
<?php endif; // End if $tags_list ?>
<?php endif; // End if ‘post’ == get_post_type() ?><br /><br /> <?php if ( comments_open() ) : ?>
<?php if ( $show_sep ) : ?>
<span class="sep"> | </span>
<?php endif; // End if $show_sep ?>
<span class="comments-link"><?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Leave a reply’, ‘twentyeleven’ ) . ‘</span>’, __( ‘<b>1</b> Reply’, ‘twentyeleven’ ), __( ‘<b>%</b> Replies’, ‘twentyeleven’ ) ); ?></span>
<?php endif; // End if comments_open() ?><br /><br /> <?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</footer><!– #entry-meta –>
</article><!– #post-<?php the_ID(); ?> –>
[/php]

footer.php

[php]
<?php
/**
* フッターを表示するテンプレート
*
* id=main の div 要素を閉じ、すべての要素の後にきます。
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><br /><br /> </div><!– #main –><br /><br /> <footer id="colophon" role="contentinfo"><br /><br /> <?php
/* フッターにサイドバーですって? その通り。
* 三列のウィジェットでフッターをカスタマイズできるんです。
*/
get_sidebar( ‘footer’ );
?><br /><br /> <div id="site-generator">
<?php do_action( ‘twentyeleven_credits’ ); ?>
<a href="<?php echo esc_url( __( ‘http://wordpress.org/’, ‘twentyeleven’ ) ); ?>" title="<?php esc_attr_e( ‘Semantic Personal Publishing Platform’, ‘twentyeleven’ ); ?>" rel="generator"><?php printf( __( ‘Proudly powered by %s’, ‘twentyeleven’ ), ‘WordPress’ ); ?></a>
</div>
</footer><!– #colophon –>
</div><!– #page –><br /><br /><?php wp_footer(); ?><br /><br /></body>
</html>
[/php]

functions.php

[php]
<?php
/**
* Twenty Eleven の機能と定義
*
* テーマをセットアップし、ヘルパー機能を提供します。一部のヘルパー機能は
* テーマの中でカスタムテンプレートタグとして使用されます。それ以外のものは、
* WordPress のコア機能を変更するアクションとフィルターフックに取り付けられます。
*
* 最初の機能は、 twentyeleven_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’, ‘twentyeleven_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_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />/**
* テーマデザインとスタイルシートに基づいて、コンテンツの幅を設定します。
*/
if ( ! isset( $content_width ) )
$content_width = 584;<br /><br />/**
* ‘after_setup_theme’ フックが走ったら、twentyeleven_setup() を走らせます。
*/
add_action( ‘after_setup_theme’, ‘twentyeleven_setup’ );<br /><br />if ( ! function_exists( ‘twentyeleven_setup’ ) ):
/**
* テーマのデフォルトを設定し、WordPress の様々な機能のサポートを登録します。
*
* この関数が after_setup_theme にフックされていて、init フックの前に走ることに注意してください。
* この init フックは、例えばアイキャッチ画像のサポートの表示など、いくつかの特徴によっては
* 遅すぎるかもしれません(訳注:実行順を早めてあげる必要がある、ということだと思います)。
*
* 子テーマで twentyeleven_setup() を上書きするには、子テーマの functions.php ファイルに
* 独自の twentyeleven_setup を追加してください。
*
* @uses load_theme_textdomain() 翻訳/国際化をサポートします。
* @uses add_editor_style() ビジュアルエディターのスタイル変更をサポートします。
* @uses add_theme_support() アイキャッチ画像と自動フィードリンクをサポートします。
* @uses register_nav_menus() ナビゲーションメニューをサポートします。
* @uses add_custom_background() カスタム背景をサポートします。
* @uses add_custom_image_header() カスタムヘッダーをサポートします。
* @uses register_default_headers() テーマに用意されるデフォルトのカスタムヘッダー画像を登録します。
* @uses set_post_thumbnail_size() アイキャッチ画像のサイズを設定します。
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_setup() {<br /><br /> /* Twenty Eleven を翻訳できるようにします。
* 翻訳ファイルは /languages/ ディレクトリ内に置くことが出来ます。
* Twenty Eleven に基づくテーマを作る場合(訳者注:子テーマのことだと思われる)、
* 全テンプレートファイルの ‘twentyeleven’ をあなたのテーマの名前に置換してください。
*/
load_theme_textdomain( ‘twentyeleven’, TEMPLATEPATH . ‘/languages’ );<br /><br /> $locale = get_locale();
$locale_file = TEMPLATEPATH . "/languages/$locale.php";
if ( is_readable( $locale_file ) )
require_once( $locale_file );<br /><br /> // このテーマでは、テーマスタイルに合うように、editor-style.css でビジュアルエディタをスタイル付けします。
add_editor_style();<br /><br /> // テーマの設定ページと関連するコードを読み込みます。
require( dirname( __FILE__ ) . ‘/inc/theme-options.php’ );<br /><br /> // Twenty Eleven 短冊ウィジェットを読み込みます。
require( dirname( __FILE__ ) . ‘/inc/widgets.php’ );<br /><br /> // デフォルトの記事 RSS フィードと、コメント RSS フィード を <head> 内に追加します。
add_theme_support( ‘automatic-feed-links’ );<br /><br /> // このテーマはある位置で、 wp_nav_menu() を使います。
register_nav_menu( ‘primary’, __( ‘Primary Menu’, ‘twentyeleven’ ) );<br /><br /> // 様々な投稿フォーマットをサポートします。
add_theme_support( ‘post-formats’, array( ‘aside’, ‘link’, ‘gallery’, ‘status’, ‘quote’, ‘image’ ) );<br /><br /> // カスタム背景をサポートします。
add_custom_background();<br /><br /> // このテーマは投稿ごと/記事ごとのカスタムヘッダーにアイキャッチ画像(投稿サムネイルとも呼ばれる)を使用します。
add_theme_support( ‘post-thumbnails’ );<br /><br /> // ここから4つで Twenty Eleven カスタムヘッダーサポートを設定します。<br /><br /> // ヘッダーのテキストカラーのデフォルト設定
define( ‘HEADER_TEXTCOLOR’, ‘000’ );<br /><br /> // 空白の場合、画像のランダム表示を許可します。
define( ‘HEADER_IMAGE’, ” );<br /><br /> // カスタムヘッダーの高さと幅。
// この値を変更するには twentyeleven_header_image_width と twentyeleven_header_image_height にフィルターを追加します。
define( ‘HEADER_IMAGE_WIDTH’, apply_filters( ‘twentyeleven_header_image_width’, 1000 ) );
define( ‘HEADER_IMAGE_HEIGHT’, apply_filters( ‘twentyeleven_header_image_height’, 288 ) );<br /><br /> // 投稿と固定ページのカスタムヘッダー画像にアイキャッチ画像を使っています。
// アイキャッチ画像を定義したヘッダー画像のサイズにしたいので
// 大きな画像はフィットするように自動的に切り取られ、小さい画像は無視されます。詳しくは header.php を参照してください。
set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );<br /><br /> // Twenty Eleven のカスタム画像のサイズを追加します。
add_image_size( ‘large-feature’, HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); // 大きいアイキャッチ画像(ヘッダー画像)の場合に使用されます。
add_image_size( ‘small-feature’, 500, 300 ); // 大きい画像が存在しない場合注目記事に使用されます。<br /><br /> // デフォルトでヘッダー画像のランダム表示を有効にします。
add_theme_support( ‘custom-header’, array( ‘random-default’ => true ) );<br /><br /> // 管理画面でカスタムヘッダーをスタイル変更可能にします。
// 詳しくは下記の twentyeleven_admin_header_style()を参照してください。
add_custom_image_header( ‘twentyeleven_header_style’, ‘twentyeleven_admin_header_style’, ‘twentyeleven_admin_header_image’ );<br /><br /> // … ヘッダーの変更についてはこれでおしまいです。<br /><br /> // テーマ同梱のデフォルトカスタムヘッダー画像。 %s はテーマテンプレートディレクトリ URI のプレースフォルダです。
register_default_headers( array(
‘wheel’ => array(
‘url’ => ‘%s/images/headers/wheel.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/wheel-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Wheel’, ‘twentyeleven’ )
),
‘shore’ => array(
‘url’ => ‘%s/images/headers/shore.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/shore-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Shore’, ‘twentyeleven’ )
),
‘trolley’ => array(
‘url’ => ‘%s/images/headers/trolley.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/trolley-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Trolley’, ‘twentyeleven’ )
),
‘pine-cone’ => array(
‘url’ => ‘%s/images/headers/pine-cone.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/pine-cone-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Pine Cone’, ‘twentyeleven’ )
),
‘chessboard’ => array(
‘url’ => ‘%s/images/headers/chessboard.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/chessboard-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Chessboard’, ‘twentyeleven’ )
),
‘lanterns’ => array(
‘url’ => ‘%s/images/headers/lanterns.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/lanterns-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Lanterns’, ‘twentyeleven’ )
),
‘willow’ => array(
‘url’ => ‘%s/images/headers/willow.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/willow-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Willow’, ‘twentyeleven’ )
),
‘hanoi’ => array(
‘url’ => ‘%s/images/headers/hanoi.jpg’,
‘thumbnail_url’ => ‘%s/images/headers/hanoi-thumbnail.jpg’,
/* 翻訳者へ: ヘッダー画像の説明 */
‘description’ => __( ‘Hanoi Plant’, ‘twentyeleven’ )
)
) );
}
endif; // twentyeleven_setup<br /><br />if ( ! function_exists( ‘twentyeleven_header_style’ ) ) :
/**
* ブログに表示されるヘッダー画像とテキストのスタイル
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_header_style() {<br /><br /> // テキストにカスタム設定がされていない場合、
// get_header_textcolor() 設定を取り出す: デフォルトは HEADER_TEXTCOLOR で設定し、テキストを隠す(returns ‘blank’) か任意の16進数を設定する。
if ( HEADER_TEXTCOLOR == get_header_textcolor() )
return;
// これに成功したら、カスタムスタイルがあります。実行しましょう。
?>
<style type="text/css">
<?php
// テキストを隠しますか?
if ( ‘blank’ == get_header_textcolor() ) :
?>
#site-title,
#site-description {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
}
<?php
// ユーザーがテキストにカスタムカラーを設定している場合、それを使用します。
else :
?>
#site-title a,
#site-description {
color: #<?php echo get_header_textcolor(); ?> !important;
}
<?php endif; ?>
</style>
<?php
}
endif; // twentyeleven_header_style<br /><br />if ( ! function_exists( ‘twentyeleven_admin_header_style’ ) ) :
/**
* 外観 > ヘッダー の管理画面で表示されるヘッダー画像のスタイル
*
* twentyeleven_setup() の add_custom_image_header() から参照されます。
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_admin_header_style() {
?>
<style type="text/css">
.appearance_page_custom-header #headimg {
border: none;
}
#headimg h1,
#desc {
font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
}
#headimg h1 {
margin: 0;
}
#headimg h1 a {
font-size: 32px;
line-height: 36px;
text-decoration: none;
}
#desc {
font-size: 14px;
line-height: 23px;
padding: 0 0 3em;
}
<?php
// ユーザーがテキストにカスタムカラーを設定している場合、それを使用します。
if ( get_header_textcolor() != HEADER_TEXTCOLOR ) :
?>
#site-title a,
#site-description {
color: #<?php echo get_header_textcolor(); ?>;
}
<?php endif; ?>
#headimg img {
max-width: 1000px;
height: auto;
width: 100%;
}
</style>
<?php
}
endif; // twentyeleven_admin_header_style<br /><br />if ( ! function_exists( ‘twentyeleven_admin_header_image’ ) ) :
/**
* 外観 > ヘッダーの管理画面に表示されるカスタムヘッダー画像のマークアップ
*
* twentyeleven_setup() の add_custom_image_header() から参照されます。
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_admin_header_image() { ?>
<div id="headimg">
<?php
if ( ‘blank’ == get_theme_mod( ‘header_textcolor’, HEADER_TEXTCOLOR ) || ” == get_theme_mod( ‘header_textcolor’, HEADER_TEXTCOLOR ) )
$style = ‘ style="display:none;"’;
else
$style = ‘ style="color:#’ . get_theme_mod( ‘header_textcolor’, HEADER_TEXTCOLOR ) . ‘;"’;
?>
<h1><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( ‘/’ ) ); ?>"><?php bloginfo( ‘name’ ); ?></a></h1>
<div id="desc"<?php echo $style; ?>><?php bloginfo( ‘description’ ); ?></div>
<?php $header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
<img src="<?php echo esc_url( $header_image ); ?>" alt="" />
<?php endif; ?>
</div>
<?php }
endif; // twentyeleven_admin_header_image<br /><br />/**
* 投稿の抜粋の長さを40単語に設定します。
*
* これを子テーマで上書きするには、フィルターを削除し、
* excerpt_length フィルターフックと結ばれる関数を追加してください。
*/
function twentyeleven_excerpt_length( $length ) {
return 40;
}
add_filter( ‘excerpt_length’, ‘twentyeleven_excerpt_length’ );<br /><br />/**
* 抜粋に "続きを読む" リンクを返します。
*/
function twentyeleven_continue_reading_link() {
return ‘ <a href="’. esc_url( get_permalink() ) . ‘">’ . __( ‘Continue reading <span class="meta-nav">&rarr;</span>’, ‘twentyeleven’ ) . ‘</a>’;
}<br /><br />/**
* 省略記号と twentyeleven_continue_reading_link() で "[…]" を置き換えます(自動的に作られる抜粋に付け加えて)。
*
* これを子テーマで上書きするには、フィルターを取り除き、excerpt_more フィルターフックと結ばれる
* 関数を追加してください。
*/
function twentyeleven_auto_excerpt_more( $more ) {
return ‘ &hellip;’ . twentyeleven_continue_reading_link();
}
add_filter( ‘excerpt_more’, ‘twentyeleven_auto_excerpt_more’ );<br /><br />/**
* カスタム投稿の抜粋に "続きを読む" リンクを加えます。
*
* これを子テーマで上書きするには、フィルターを取り除き、get_the_excerpt フィルターフック と結ばれる
* function を追加してください。
*/
function twentyeleven_custom_excerpt_more( $output ) {
if ( has_excerpt() && ! is_attachment() ) {
$output .= twentyeleven_continue_reading_link();
}
return $output;
}
add_filter( ‘get_the_excerpt’, ‘twentyeleven_custom_excerpt_more’ );<br /><br />/**
* ホームリンクを表示するのに、 wp_nav_menu() 、 wp_page_menu() を引っ込めます。
*/
function twentyeleven_page_menu_args( $args ) {
$args[‘show_home’] = true;
return $args;
}
add_filter( ‘wp_page_menu_args’, ‘twentyeleven_page_menu_args’ );<br /><br />/**
* サイドバーとウィジェットのエリアを登録します。デフォルトの短冊ウィジェットも登録します。
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_widgets_init() {<br /><br /> register_widget( ‘Twenty_Eleven_Ephemera_Widget’ );<br /><br /> register_sidebar( array(
‘name’ => __( ‘Main Sidebar’, ‘twentyeleven’ ),
‘id’ => ‘sidebar-1’,
‘before_widget’ => ‘<aside id="%1$s" class="widget %2$s">’,
‘after_widget’ => "</aside>",
‘before_title’ => ‘<h3 class="widget-title">’,
‘after_title’ => ‘</h3>’,
) );<br /><br /> register_sidebar( array(
‘name’ => __( ‘Showcase Sidebar’, ‘twentyeleven’ ),
‘id’ => ‘sidebar-2’,
‘description’ => __( ‘The sidebar for the optional Showcase Template’, ‘twentyeleven’ ),
‘before_widget’ => ‘<aside id="%1$s" class="widget %2$s">’,
‘after_widget’ => "</aside>",
‘before_title’ => ‘<h3 class="widget-title">’,
‘after_title’ => ‘</h3>’,
) );<br /><br /> register_sidebar( array(
‘name’ => __( ‘Footer Area One’, ‘twentyeleven’ ),
‘id’ => ‘sidebar-3’,
‘description’ => __( ‘An optional widget area for your site footer’, ‘twentyeleven’ ),
‘before_widget’ => ‘<aside id="%1$s" class="widget %2$s">’,
‘after_widget’ => "</aside>",
‘before_title’ => ‘<h3 class="widget-title">’,
‘after_title’ => ‘</h3>’,
) );<br /><br /> register_sidebar( array(
‘name’ => __( ‘Footer Area Two’, ‘twentyeleven’ ),
‘id’ => ‘sidebar-4’,
‘description’ => __( ‘An optional widget area for your site footer’, ‘twentyeleven’ ),
‘before_widget’ => ‘<aside id="%1$s" class="widget %2$s">’,
‘after_widget’ => "</aside>",
‘before_title’ => ‘<h3 class="widget-title">’,
‘after_title’ => ‘</h3>’,
) );<br /><br /> register_sidebar( array(
‘name’ => __( ‘Footer Area Three’, ‘twentyeleven’ ),
‘id’ => ‘sidebar-5’,
‘description’ => __( ‘An optional widget area for your site footer’, ‘twentyeleven’ ),
‘before_widget’ => ‘<aside id="%1$s" class="widget %2$s">’,
‘after_widget’ => "</aside>",
‘before_title’ => ‘<h3 class="widget-title">’,
‘after_title’ => ‘</h3>’,
) );
}
add_action( ‘widgets_init’, ‘twentyeleven_widgets_init’ );<br /><br />/**
* 利用できるときに次/前のページへのナビゲーションを表示します。
*/
function twentyeleven_content_nav( $nav_id ) {
global $wp_query;<br /><br /> if ( $wp_query->max_num_pages > 1 ) : ?>
<nav id="<?php echo $nav_id; ?>">
<h3 class="assistive-text"><?php _e( ‘Post navigation’, ‘twentyeleven’ ); ?></h3>
<div class="nav-previous"><?php next_posts_link( __( ‘<span class="meta-nav">&larr;</span> Older posts’, ‘twentyeleven’ ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( ‘Newer posts <span class="meta-nav">&rarr;</span>’, ‘twentyeleven’ ) ); ?></div>
</nav><!– #nav-above –>
<?php endif;
}<br /><br />/**
* 投稿コンテンツ内の最初のリンクの URL を返します。
*
* @since Twenty Eleven 1.0
* @return string|bool URL or false when no link is present.
*/
function twentyeleven_url_grabber() {
if ( ! preg_match( ‘/<a\s[^>]*?href=[\’"](.+?)[\’"]/is’, get_the_content(), $matches ) )
return false;<br /><br /> return esc_url_raw( $matches[1] );
}<br /><br />/**
* フッター用のダイナミッククラスを有効にするため、フッターサイドバーの数を数えます。
*/
function twentyeleven_footer_sidebar_class() {
$count = 0;<br /><br /> if ( is_active_sidebar( ‘sidebar-3’ ) )
$count++;<br /><br /> if ( is_active_sidebar( ‘sidebar-4’ ) )
$count++;<br /><br /> if ( is_active_sidebar( ‘sidebar-5’ ) )
$count++;<br /><br /> $class = ”;<br /><br /> switch ( $count ) {
case ‘1’:
$class = ‘one’;
break;
case ‘2’:
$class = ‘two’;
break;
case ‘3’:
$class = ‘three’;
break;
}<br /><br /> if ( $class )
echo ‘class="’ . $class . ‘"’;
}<br /><br />if ( ! function_exists( ‘twentyeleven_comment’ ) ) :
/**
* コメントとピンバックのテンプレート。
*
* コメントテンプレートを修正することなく子テーマでこれを上書きするには
* 独自の twentyeleven_comment() を作ると、その関数が代わりに使用されます。
*
* コメントを表示するための wp_list_comments() による呼び戻しとして使われています。
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_comment( $comment, $args, $depth ) {
$GLOBALS[‘comment’] = $comment;
switch ( $comment->comment_type ) :
case ‘pingback’ :
case ‘trackback’ :
?>
<li class="post pingback">
<p><?php _e( ‘Pingback:’, ‘twentyeleven’ ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?></p>
<?php
break;
default :
?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
<article id="comment-<?php comment_ID(); ?>" class="comment">
<footer class="comment-meta">
<div class="comment-author vcard">
<?php
$avatar_size = 68;
if ( ‘0’ != $comment->comment_parent )
$avatar_size = 39;<br /><br /> echo get_avatar( $comment, $avatar_size );<br /><br /> /* 翻訳者へ: 1: コメントの作成者, 2: 日付と時間 */
printf( __( ‘%1$s on %2$s <span class="says">said:</span>’, ‘twentyeleven’ ),
sprintf( ‘<span class="fn">%s</span>’, get_comment_author_link() ),
sprintf( ‘<a href="%1$s"><time pubdate datetime="%2$s">%3$s</time></a>’,
esc_url( get_comment_link( $comment->comment_ID ) ),
get_comment_time( ‘c’ ),
/* 翻訳者へ: 1: 日付, 2: 時間 */
sprintf( __( ‘%1$s at %2$s’, ‘twentyeleven’ ), get_comment_date(), get_comment_time() )
)
);
?><br /><br /> <?php edit_comment_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</div><!– .comment-author .vcard –><br /><br /> <?php if ( $comment->comment_approved == ‘0’ ) : ?>
<em class="comment-awaiting-moderation"><?php _e( ‘Your comment is awaiting moderation.’, ‘twentyeleven’ ); ?></em>
<br />
<?php endif; ?><br /><br /> </footer><br /><br /> <div class="comment-content"><?php comment_text(); ?></div><br /><br /> <div class="reply">
<?php comment_reply_link( array_merge( $args, array( ‘reply_text’ => __( ‘Reply <span>&darr;</span>’, ‘twentyeleven’ ), ‘depth’ => $depth, ‘max_depth’ => $args[‘max_depth’] ) ) ); ?>
</div><!– .reply –>
</article><!– #comment-## –><br /><br /> <?php
break;
endswitch;
}
endif; // twentyeleven_comment() の確認終了<br /><br />if ( ! function_exists( ‘twentyeleven_posted_on’ ) ) :
/**
* 投稿日時、作成者に関するメタ情報を HTML で印字します。
* 子テーマで上書きするには独自の twentyeleven_posted_on を作ってください。
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_posted_on() {
printf( __( ‘<span class="sep">Posted on </span><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s" pubdate>%4$s</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="%5$s" title="%6$s" rel="author">%7$s</a></span></span>’, ‘twentyeleven’ ),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( ‘c’ ) ),
esc_html( get_the_date() ),
esc_url( get_author_posts_url( get_the_author_meta( ‘ID’ ) ) ),
sprintf( esc_attr__( ‘View all posts by %s’, ‘twentyeleven’ ), get_the_author() ),
esc_html( get_the_author() )
);
}
endif;<br /><br />/**
* body タグのクラスの配列に2つのクラスを追加します。
* 最初のはサイトが一人だけの作成者が公開された投稿を書いている場合のものです。
* 2つ目のはシングル投稿が表示された場合のものです。
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_body_classes( $classes ) {<br /><br /> if ( ! is_multi_author() ) {
$classes[] = ‘single-author’;
}<br /><br /> if ( is_singular() && ! is_home() && ! is_page_template( ‘showcase.php’ ) && ! is_page_template( ‘sidebar-page.php’ ) )
$classes[] = ‘singular’;<br /><br /> return $classes;
}
add_filter( ‘body_class’, ‘twentyeleven_body_classes’ );
[/php]

header.php

[php]
<?php
/**
* テーマのヘッダー
*
* <head> 部分の全ての要素と、<div id="main"> までのあらゆるものを表示します。
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><!DOCTYPE html>
<!–[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]–>
<!–[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]–>
<!–[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]–>
<!–[if !(IE 6) | !(IE 7) | !(IE 8) ]><!–>
<html <?php language_attributes(); ?>>
<!–<![endif]–>
<head>
<meta charset="<?php bloginfo( ‘charset’ ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php
/*
* 見るページに応じて、<title> タグを表示します。
*/
global $page, $paged;<br /><br /> wp_title( ‘|’, true, ‘right’ );<br /><br /> // ブログ名を追加します。
bloginfo( ‘name’ );<br /><br /> // ホーム/フロントページにブログの説明を追加します。
$site_description = get_bloginfo( ‘description’, ‘display’ );
if ( $site_description && ( is_home() || is_front_page() ) )
echo " | $site_description";<br /><br /> // 必要であればページ番号を追加します:
if ( $paged >= 2 || $page >= 2 )
echo ‘ | ‘ . sprintf( __( ‘Page %s’, ‘twentyeleven’ ), max( $paged, $page ) );<br /><br /> ?></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’ ); ?>" />
<!–[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]–>
<?php
/* コメントのスレッド表示が使用できるときには、それをサポートするように
* コメントフォームのあるページに JavaScript を追加します。
*/
if ( is_singular() && get_option( ‘thread_comments’ ) )
wp_enqueue_script( ‘comment-reply’ );<br /><br /> /* wp_head() はいつも、テーマの </head> タグの直前にあります。
* そうでないと、このフックを使って <head> に
* スタイルやスクリプトやメタタグを加える
* 多くのプラグインの動作を止めてしまうでしょう。
*/
wp_head();
?>
</head><br /><br /><body <?php body_class(); ?>>
<div id="page" class="hfeed">
<header id="branding" role="banner">
<hgroup>
<h1 id="site-title"><span><a href="<?php echo esc_url( home_url( ‘/’ ) ); ?>" title="<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>" rel="home"><?php bloginfo( ‘name’ ); ?></a></span></h1>
<h2 id="site-description"><?php bloginfo( ‘description’ ); ?></h2>
</hgroup><br /><br /> <?php
// ヘッダー画像が取り去られたかどうかを確認します。
$header_image = get_header_image();
if ( ! empty( $header_image ) ) :
?>
<a href="<?php echo esc_url( home_url( ‘/’ ) ); ?>">
<?php
// ヘッダー画像
// 表示されるのが投稿かページか、アイキャッチ画像があるか、それが大きいものかを確認します。
if ( is_singular() &&
has_post_thumbnail( $post->ID ) &&
( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) &&
$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; // アイキャッチ画像か普通のヘッダーかの確認の最後 ?>
</a>
<?php endif; // 取り去られたヘッダー画像の確認の最後 ?><br /><br /> <?php
// ヘッダーのテキストは隠されていますか?
if ( ‘blank’ == get_header_textcolor() ) :
?>
<div class="only-search<?php if ( ! empty( $header_image ) ) : ?> with-image<?php endif; ?>">
<?php get_search_form(); ?>
</div>
<?php
else :
?>
<?php get_search_form(); ?>
<?php endif; ?><br /><br /> <nav id="access" role="navigation">
<h3 class="assistive-text"><?php _e( ‘Main menu’, ‘twentyeleven’ ); ?></h3>
<?php /* スクリーンリーダーやテキストブラウザーがナビゲーションメニューをスキップして、すぐにコンテンツに到達できるようにします。 */ ?>
<div class="skip-link"><a class="assistive-text" href="#content" title="<?php esc_attr_e( ‘Skip to primary content’, ‘twentyeleven’ ); ?>"><?php _e( ‘Skip to primary content’, ‘twentyeleven’ ); ?></a></div>
<div class="skip-link"><a class="assistive-text" href="#secondary" title="<?php esc_attr_e( ‘Skip to secondary content’, ‘twentyeleven’ ); ?>"><?php _e( ‘Skip to secondary content’, ‘twentyeleven’ ); ?></a></div>
<?php /* ナビゲーションメニューです。メニューが入力されていなければ、wp_nav_menu は wp_page_menu に戻ります。一番の位置に割り付けられたメニューが使われます。何も割り付けられていなければ、最も低い ID のメニューが使われます。 */ ?>
<?php wp_nav_menu( array( ‘theme_location’ => ‘primary’ ) ); ?>
</nav><!– #access –>
</header><!– #branding –><br /><br /> <div id="main">
[/php]

image.php

[php]
<?php
/**
* 添付画像を表示するテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />get_header(); ?><br /><br /> <div id="primary" class="image-attachment">
<div id="content" role="main"><br /><br /> <?php the_post(); ?><br /><br /> <nav id="nav-single">
<h3 class="assistive-text"><?php _e( ‘Image navigation’, ‘twentyeleven’ ); ?></h3>
<span class="nav-previous"><?php previous_image_link( false, __( ‘&larr; Previous’ , ‘twentyeleven’ ) ); ?></span>
<span class="nav-next"><?php next_image_link( false, __( ‘Next &rarr;’ , ‘twentyeleven’ ) ); ?></span>
</nav><!– #nav-single –><br /><br /> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<h1 class="entry-title"><?php the_title(); ?></h1><br /><br /> <div class="entry-meta">
<?php
$metadata = wp_get_attachment_metadata();
printf( __( ‘<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>’, ‘twentyeleven’ ),
esc_attr( get_the_time() ),
get_the_date(),
esc_url( wp_get_attachment_url() ),
$metadata[‘width’],
$metadata[‘height’],
esc_url( get_permalink( $post->post_parent ) ),
get_the_title( $post->post_parent )
);
?>
<?php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class="edit-link">’, ‘</span>’ ); ?>
</div><!– .entry-meta –><br /><br /> </header><!– .entry-header –><br /><br /> <div class="entry-content"><br /><br /> <div class="entry-attachment">
<div class="attachment">
<?php
/**
* ギャラリーのすべての添付画像の ID をつかんで、ギャラリー内の隣りあった次の画像の URL を得たり、
* (ギャラリーの最後の画像を探していて)最初の画像の URL を得たり、あるいは、画像ファイルへのリンクを得たりします。
*/
$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++;
// ギャラリーに1つ以上の添付がある場合
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 {
// あるいは、1つだけ画像がある場合、その画像の URL を取得します。
$next_attachment_url = wp_get_attachment_url();
}
?>
<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
$attachment_size = apply_filters( ‘twentyeleven_attachment_size’, 848 );
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) ); // 画像の高さに対して、画像の長さを 1024px を限度にフィルターすることができます。
?></a><br /><br /> <?php if ( ! empty( $post->post_excerpt ) ) : ?>
<div class="entry-caption">
<?php the_excerpt(); ?>
</div>
<?php endif; ?>
</div><!– .attachment –><br /><br /> </div><!– .entry-attachment –><br /><br /> <div class="entry-description">
<?php the_content(); ?>
<?php wp_link_pages( array( ‘before’ => ‘<div class="page-link"><span>’ . __( ‘Pages:’, ‘twentyeleven’ ) . ‘</span>’, ‘after’ => ‘</div>’ ) ); ?>
</div><!– .entry-description –><br /><br /> </div><!– .entry-content –><br /><br /> </article><!– #post-<?php the_ID(); ?> –><br /><br /> <?php comments_template(); ?><br /><br /> </div><!– #content –>
</div><!– #primary –><br /><br /><?php get_footer(); ?>
[/php]

index.php

[php]
<?php
/**
* メインテンプレートファイル。
*
* これは WordPress テーマで最も一般的なテンプレートファイルで、
* テーマに必要な2つのファイルのうちのひとつです(もうひとつのファイルは style.css になります)。
* 問合せに一致するものが特にないときにページを表示するのに使用されます。
* 例えば、home.php ファイルが存在しないときには、ホームページとなります。
* 詳しくは: http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Eleven
*/<br /><br />get_header(); ?><br /><br /> <div id="primary">
<div id="content" role="main"><br /><br /> <?php if ( have_posts() ) : ?><br /><br /> <?php twentyeleven_content_nav( ‘nav-above’ ); ?><br /><br /> <?php /* ループを開始 */ ?>
<?php while ( have_posts() ) : the_post(); ?><br /><br /> <?php get_template_part( ‘content’, get_post_format() ); ?><br /><br /> <?php endwhile; ?><br /><br /> <?php twentyeleven_content_nav( ‘nav-below’ ); ?><br /><br /> <?php else : ?><br /><br /> <article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( ‘Nothing Found’, ‘twentyeleven’ ); ?></h1>
</header><!– .entry-header –><br /><br /> <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.’, ‘twentyeleven’ ); ?></p>
<?php get_search_form(); ?>
</div><!– .entry-content –>
</article><!– #post-0 –><br /><br /> <?php endif; ?><br /><br /> </div><!– #content –>
</div><!– #primary –><br /><br /><?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

page.php

[php]
<?php
/**
* すべての固定ページを表示するためのテンプレート。
*
* これは、デフォルトですべての固定ページを表示するテンプレートです。
* これが WordPress の固定ページを構成しているということと、
* お持ちの WordPress サイトの他の ‘固定ページ’ は
* 別のテンプレートを使う、ということに注意してください。
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />get_header(); ?><br /><br /> <div id="primary">
<div id="content" role="main"><br /><br /> <?php the_post(); ?><br /><br /> <?php get_template_part( ‘content’, ‘page’ ); ?><br /><br /> <?php comments_template( ”, true ); ?><br /><br /> </div><!– #content –>
</div><!– #primary –><br /><br /><?php get_footer(); ?>
[/php]

search.php

[php]
<?php
/**
* 検索結果ページを表示するためのテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />get_header(); ?><br /><br /> <section id="primary">
<div id="content" role="main"><br /><br /> <?php if ( have_posts() ) : ?><br /><br /> <header class="page-header">
<h1 class="page-title"><?php printf( __( ‘Search Results for: %s’, ‘twentyeleven’ ), ‘<span>’ . get_search_query() . ‘</span>’ ); ?></h1>
</header><br /><br /> <?php twentyeleven_content_nav( ‘nav-above’ ); ?><br /><br /> <?php /* ループを開始 */ ?>
<?php while ( have_posts() ) : the_post(); ?><br /><br /> <?php
/* コンテンツ用の投稿フォーマットテンプレートをインクルードします。
* これを子テーマで上書きしたい場合は、
* content-___.php ( ___ の部分は投稿フォーマット名が入る) というファイルを含めれば、かわりにそのファイルが使われます。
*/
get_template_part( ‘content’, get_post_format() );
?><br /><br /> <?php endwhile; ?><br /><br /> <?php twentyeleven_content_nav( ‘nav-below’ ); ?><br /><br /> <?php else : ?><br /><br /> <article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( ‘Nothing Found’, ‘twentyeleven’ ); ?></h1>
</header><!– .entry-header –><br /><br /> <div class="entry-content">
<p><?php _e( ‘Sorry, but nothing matched your search criteria. Please try again with some different keywords.’, ‘twentyeleven’ ); ?></p>
<?php get_search_form(); ?>
</div><!– .entry-content –>
</article><!– #post-0 –><br /><br /> <?php endif; ?><br /><br /> </div><!– #content –>
</section><!– #primary –><br /><br /><?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

searchform.php

[php]
<?php
/**
* Twenty Eleven で検索フォームを表示するテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?>
<form method="get" id="searchform" action="<?php echo esc_url( home_url( ‘/’ ) ); ?>">
<label for="s" class="assistive-text"><?php _e( ‘Search’, ‘twentyeleven’ ); ?></label>
<input type="text" class="field" name="s" id="s" placeholder="<?php esc_attr_e( ‘Search’, ‘twentyeleven’ ); ?>" />
<input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( ‘Search’, ‘twentyeleven’ ); ?>" />
</form>
[/php]

showcase.php

[php]
<?php
/**
* Template Name: Showcase Template
* Description: 固定記事、アサイド、ブログ投稿を目立たせて見せる固定ページテンプレート
*
* Twenty Eleven のショーケーステンプレートは固定記事を使った注目記事セクション、
* もうひとつの最近の投稿エリア (最新の記事は全文見せて、残りはリストで見せる)、
* アサイドの記事を見せる左サイドバーから構成されます。
*
* サイドバーに適切な投稿とカスタムウィジェットを取ってくる2つのクエリを作っています。
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />// スライダー用のショーケーススクリプトをキューに入れます。
wp_enqueue_script( ‘twentyeleven-showcase’, get_template_directory_uri() . ‘/js/showcase.js’, array( ‘jquery’ ), ‘2011-04-28’ );<br /><br />get_header(); ?><br /><br /> <div id="primary" class="showcase">
<div id="content" role="main"><br /><br /> <?php the_post(); ?><br /><br /> <?php
/**
* the_content をレンダリングして、見出しを使っています。
* このページにコンテンツがあるなら、それを表示しましょう。
*/
if ( ” != get_the_content() )
get_template_part( ‘content’, ‘intro’ );
?><br /><br /> <?php
/**
* 注目記事セクションを開始します。
*
* 固定記事があって、それを使って注目記事をつくるかどうか確認します。
* 注目記事は10までに制限しています。
*/
$sticky = get_option( ‘sticky_posts’ );<br /><br /> // Proceed only if sticky posts exist.
if ( ! empty( $sticky ) ) :<br /><br /> $featured_args = array(
‘post__in’ => $sticky,
‘post_status’ => ‘publish’,
‘posts_per_page’ => 10,
‘no_found_rows’ => true,
);<br /><br /> // 注目記事のクエリ
$featured = new WP_Query( $featured_args );<br /><br /> // 公開された記事が存在する場合のみ処理を進める
if ( $featured->have_posts() ) :<br /><br /> /**
* スライダーナビをつくるために、ゼロから
* 注目記事を数える必要があります。
*/
$counter_slider = 0;<br /><br /> ?><br /><br /> <div class="featured-posts">
<h1 class="showcase-heading"><?php _e( ‘Featured Post’, ‘twentyeleven’ ); ?></h1><br /><br /> <?php
// はじめましょう。
while ( $featured->have_posts() ) : $featured->the_post();<br /><br /> // カウンターを増やします。
$counter_slider++;<br /><br /> /**
* アイキャッチ画像のかわりに、注目記事にクラスを追加します。
* デフォルトで feature-text クラスがつきます。
*/
$feature_class = ‘feature-text’;<br /><br /> if ( has_post_thumbnail() ) {
// … けれど記事にアイキャッチ画像がある場合はクラスを追加しましょう。
$feature_class = ‘feature-image small’;<br /><br /> // ちょっと待って。この画像を調査しましょう。
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) );<br /><br /> // 画像はヘッダーより大きい、それとも同じ?
if ( $image[1] >= HEADER_IMAGE_WIDTH ) {
// 画像がヘッダーより大きければ、large クラスを追加します。特別扱いです。
$feature_class = ‘feature-image large’;
}
}
?><br /><br /> <section class="featured-post <?php echo $feature_class; ?>" id="featured-post-<?php echo $counter_slider; ?>"><br /><br /> <?php
/**
* アイキャッチ画像がヘッダー画像と同じ大きさの場合
* 大きい注目記事にし、そうでなければ小さくします。
*/
if ( has_post_thumbnail() ) {
if ( $image[1] >= HEADER_IMAGE_WIDTH )
$thumbnail_size = ‘large-feature’;
else
$thumbnail_size = ‘small-feature’;
?>
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_post_thumbnail( $thumbnail_size ); ?></a>
<?php
}
?>
<?php get_template_part( ‘content’, ‘featured’ ); ?>
</section>
<?php endwhile; ?><br /><br /> <?php
// 注目記事がひとつ以上ある場合にのみスライダーを表示します。
if ( $featured->post_count > 1 ) :
?>
<nav class="feature-slider">
<ul>
<?php<br /><br /> // マッチする要素が最後になるように、カウンターをリセットします。
$counter_slider = 0;<br /><br /> // ゼロから開始します。
rewind_posts();<br /><br /> // さぁ、もう一度はじめましょう。
while ( $featured->have_posts() ) : $featured->the_post();
$counter_slider++;
if ( 1 == $counter_slider )
$class = ‘class="active"’;
else
$class = ”;
?>
<li><a href="#featured-post-<?php echo $counter_slider; ?>" title="<?php printf( esc_attr__( ‘Featuring: %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" <?php echo $class; ?>></a></li>
<?php endwhile; ?>
</ul>
</nav>
<?php endif; // 固定記事がひとつ以上ある場合の確認終了 ?>
</div><!– .featured-posts –>
<?php endif; // 公開された記事の確認終了 ?>
<?php endif; // 固定記事の確認終了 ?><br /><br /> <section class="recent-posts">
<h1 class="showcase-heading"><?php _e( ‘Recent Posts’, ‘twentyeleven’ ); ?></h1><br /><br /> <?php<br /><br /> // 最近の投稿を表示します。最新のものはフルコンテンツで表示し、アサイドの投稿は無視します。
$recent_args = array(
‘order’ => ‘DESC’,
‘post__not_in’ => get_option( ‘sticky_posts’ ),
‘tax_query’ => array(
array(
‘taxonomy’ => ‘post_format’,
‘terms’ => array( ‘post-format-aside’, ‘post-format-link’, ‘post-format-quote’, ‘post-format-status’ ),
‘field’ => ‘slug’,
‘operator’ => ‘NOT IN’,
),
),
‘no_found_rows’ => true,
);<br /><br /> // 最近の投稿セクションの新しいクエリ
$recent = new WP_Query( $recent_args );<br /><br /> // 一番最初の最近の投稿は普通通りに表示します。
if ( $recent->have_posts() ) : $recent->the_post();<br /><br /> // 投稿の最初の部分のみ得るため、$more に 0 をセットします。
global $more;
$more = 0;<br /><br /> get_template_part( ‘content’, get_post_format() );<br /><br /> echo ‘<ol class="other-recent-posts">’;<br /><br /> endif;<br /><br /> // 他の最近の記事すべてに対しては、タイトルとコメントの状況だけを表示します。
while ( $recent->have_posts() ) : $recent->the_post(); ?><br /><br /> <li class="entry-title">
<a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyeleven’ ), the_title_attribute( ‘echo=0’ ) ); ?>" rel="bookmark"><?php the_title(); ?></a>
<span class="comments-link">
<?php comments_popup_link( ‘<span class="leave-reply">’ . __( ‘Leave a reply’, ‘twentyeleven’ ) . ‘</span>’, __( ‘<b>1</b> Reply’, ‘twentyeleven’ ), __( ‘<b>%</b> Replies’, ‘twentyeleven’ ) ); ?>
</span>
</li><br /><br /> <?php
endwhile;<br /><br /> // 投稿がある場合、<ol> を閉じます。
if ( $recent->post_count > 0 )
echo ‘</ol>’;
?>
</section><!– .recent-posts –><br /><br /> <div class="widget-area" role="complementary">
<?php if ( ! dynamic_sidebar( ‘sidebar-2’ ) ) : ?><br /><br /> <?php
the_widget( ‘Twenty_Eleven_Ephemera_Widget’, ”, array( ‘before_title’ => ‘<h3 class="widget-title">’, ‘after_title’ => ‘</h3>’ ) );
?><br /><br /> <?php endif; // end sidebar widget area ?>
</div><!– .widget-area –><br /><br /> </div><!– #content –>
</div><!– #primary –><br /><br /><?php get_footer(); ?>
[/php]

sidebar-footer.php

[php]
<?php
/**
* フッターウィジェットエリア
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/
?><br /><br /><?php
/* フッターウィジェット領域は、その領域のいずれかに
* ウィジェットがあると動作します。最初にこのことを確認しましょう。
*
* サイドバーのいずれにもウィジェットがなければ、諦めましょう。
*/
if ( ! is_active_sidebar( ‘sidebar-3’ )
&& ! is_active_sidebar( ‘sidebar-4’ )
&& ! is_active_sidebar( ‘sidebar-5’ )
)
return;
// これに成功すれば、ウィジェットがあります。こうします。
?>
<div id="supplementary" <?php twentyeleven_footer_sidebar_class(); ?>>
<?php if ( is_active_sidebar( ‘sidebar-3’ ) ) : ?>
<div id="first" class="widget-area" role="complementary">
<?php dynamic_sidebar( ‘sidebar-3’ ); ?>
</div><!– #first .widget-area –>
<?php endif; ?><br /><br /> <?php if ( is_active_sidebar( ‘sidebar-4’ ) ) : ?>
<div id="second" class="widget-area" role="complementary">
<?php dynamic_sidebar( ‘sidebar-4’ ); ?>
</div><!– #second .widget-area –>
<?php endif; ?><br /><br /> <?php if ( is_active_sidebar( ‘sidebar-5’ ) ) : ?>
<div id="third" class="widget-area" role="complementary">
<?php dynamic_sidebar( ‘sidebar-5’ ); ?>
</div><!– #third .widget-area –>
<?php endif; ?>
</div><!– #supplementary –>
[/php]

sidebar-page.php

[php]
<?php
/**
* Template Name: Sidebar Template
* Description: ページにサイドバーを追加する固定ページテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />get_header(); ?><br /><br /> <div id="primary">
<div id="content" role="main"><br /><br /> <?php the_post(); ?><br /><br /> <?php get_template_part( ‘content’, ‘page’ ); ?><br /><br /> <?php comments_template( ”, true ); ?><br /><br /> </div><!– #content –>
</div><!– #primary –><br /><br /><?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

sidebar.php

[php]
<?php
/**
* メインウィジェットエリアを含むサイドバー
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />$options = twentyeleven_get_theme_options();
$current_layout = $options[‘theme_layout’];<br /><br />if ( ‘content’ != $current_layout ) :
?>
<div id="secondary" class="widget-area" role="complementary">
<?php if ( ! dynamic_sidebar( ‘sidebar-1’ ) ) : ?><br /><br /> <aside id="archives" class="widget">
<h3 class="widget-title"><?php _e( ‘Archives’, ‘twentyeleven’ ); ?></h3>
<ul>
<?php wp_get_archives( array( ‘type’ => ‘monthly’ ) ); ?>
</ul>
</aside><br /><br /> <aside id="meta" class="widget">
<h3 class="widget-title"><?php _e( ‘Meta’, ‘twentyeleven’ ); ?></h3>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</aside><br /><br /> <?php endif; // end sidebar widget area ?>
</div><!– #secondary .widget-area –>
<?php endif; ?>
[/php]

single.php

[php]
<?php
/**
* すべてのシングルの投稿を表示するテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />get_header(); ?><br /><br /> <div id="primary">
<div id="content" role="main"><br /><br /> <?php while ( have_posts() ) : the_post(); ?><br /><br /> <nav id="nav-single">
<h3 class="assistive-text"><?php _e( ‘Post navigation’, ‘twentyeleven’ ); ?></h3>
<span class="nav-previous"><?php previous_post_link( ‘%link’, __( ‘<span class="meta-nav">&larr;</span> Previous’, ‘twentyeleven’ ) ); ?></span>
<span class="nav-next"><?php next_post_link( ‘%link’, __( ‘Next <span class="meta-nav">&rarr;</span>’, ‘twentyeleven’ ) ); ?></span>
</nav><!– #nav-single –><br /><br /> <?php get_template_part( ‘content’, ‘single’ ); ?><br /><br /> <?php comments_template( ”, true ); ?><br /><br /> <?php endwhile; // end of the loop. ?><br /><br /> </div><!– #content –>
</div><!– #primary –><br /><br /><?php get_footer(); ?>
[/php]

tag.php

[php]
<?php
/**
* タグアーカイブページを表示するために使用されるテンプレート
*
* @package WordPress
* @subpackage Twenty_Eleven
* @since Twenty Eleven 1.0
*/<br /><br />get_header(); ?><br /><br /> <section id="primary">
<div id="content" role="main"><br /><br /> <?php if ( have_posts() ) : ?><br /><br /> <header class="page-header">
<h1 class="page-title"><?php
printf( __( ‘Tag Archives: %s’, ‘twentyeleven’ ), ‘<span>’ . single_tag_title( ”, false ) . ‘</span>’ );
?></h1><br /><br /> <?php
$tag_description = tag_description();
if ( ! empty( $tag_description ) )
echo apply_filters( ‘tag_archive_meta’, ‘<div class="tag-archive-meta">’ . $tag_description . ‘</div>’ );
?>
</header><br /><br /> <?php twentyeleven_content_nav( ‘nav-above’ ); ?><br /><br /> <?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?><br /><br /> <?php
/* コンテンツ用の投稿フォーマットテンプレートをインクルードします。
* これを子テーマで上書きしたい場合は、
* content-___.php ( ___ の部分は投稿フォーマット名が入る) というファイルを含めれば、かわりにそのファイルが使われます。
*/
get_template_part( ‘content’, get_post_format() );
?><br /><br /> <?php endwhile; ?><br /><br /> <?php twentyeleven_content_nav( ‘nav-below’ ); ?><br /><br /> <?php else : ?><br /><br /> <article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( ‘Nothing Found’, ‘twentyeleven’ ); ?></h1>
</header><!– .entry-header –><br /><br /> <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.’, ‘twentyeleven’ ); ?></p>
<?php get_search_form(); ?>
</div><!– .entry-content –>
</article><!– #post-0 –><br /><br /> <?php endif; ?><br /><br /> </div><!– #content –>
</section><!– #primary –><br /><br /><?php get_sidebar(); ?>
<?php get_footer(); ?>
[/php]

style.css

[css]
/*
Theme Name: Twenty Eleven
Theme URI: http://wordpress.org/extend/themes/twentyeleven
Author: the WordPress team
Author URI: http://wordpress.org/
Description: 2011年版の WordPress テーマは洗練されていて、軽量で、柔軟性があります。メニュー、ヘッダー画像、背景をあなたなりにアレンジしてみてください。明と暗のカラースキーム、リンクカラー、3つのレイアウトオプションが利用できるようになっています。「Twenty Eleven」は、フロントページをコンテンツの目立つショーケースへと変身させるショーケース固定ページテンプレートを備えています。ウィジェット対応のたくさんのエリア (サイドバー、3つのフッターエリア、ショーケース固定ページウィジェットエリア) があり、また、アサイド・リンク・引用・ステータスを表示する「短冊」ウィジェットを備えています。印刷用と管理者のエディタ用のスタイル、アイキャッチ画像(投稿、固定ページ上のヘッダー画像と注目の"固定"記事の大きな画像として)のサポート、6つの異なる投稿フォーマットの特別なスタイルが含まれています。
Version: 1.2
License: GNU General Public License
License URI: license.txt
Tags: dark, light, white, black, gray, one-column, two-columns, left-sidebar, right-sidebar, fixed-width, flexible-width, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
*/<br /><br />/* =ブラウザーのデフォルト CSS をリセットします。Based on work by Eric Meyer: http://meyerweb.com/eric/tools/css/reset/index.html
————————————————————– */<br /><br />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, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
border: 0;
font-family: inherit;
font-size: 100%;
font-style: inherit;
font-weight: inherit;
margin: 0;
outline: 0;
padding: 0;
vertical-align: baseline;
}
:focus {/* focus スタイルを定義することを覚えておいてください。 */
outline: 0;
}
body {
background: #fff;
line-height: 1;
}
ol, ul {
list-style: none;
}
table {/* table はマークアップ上依然として cellspacing="0" が必要です。 */
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
font-weight: normal;
text-align: left;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
a img {
border: 0;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}<br /><br />/* =構造
———————————————– */<br /><br />body {
padding: 0 2em;
}
#page {
margin: 2em auto;
max-width: 1000px;
}
#branding hgroup {
margin: 0 7.6%;
}
#access div {
margin: 0 7.6%;
}
#primary {
float: left;
margin: 0 -26.4% 0 0;
width: 100%;
}
#content {
margin: 0 34% 0 7.6%;
width: 58.4%;
}
#secondary {
float: right;
margin-right: 7.6%;
width: 18.8%;
}<br /><br />/* Singular */
.singular #primary {
margin: 0;
}
.singular #content,
.left-sidebar.singular #content {
margin: 0 7.6%;
position: relative;
width: auto;
}
.singular .entry-header,
.singular .entry-content,
.singular footer.entry-meta,
.singular #comments-title {
margin: 0 auto;
width: 68.9%;
}<br /><br />/* 添付 */
.singular .image-attachment .entry-content {
margin: 0 auto;
width: auto;
}
.singular .image-attachment .entry-description {
margin: 0 auto;
width: 68.9%;
}<br /><br />/* ショーケース */
.page-template-showcase-php #primary,
.left-sidebar.page-template-showcase-php #primary {
margin: 0;
}
.page-template-showcase-php #content,
.left-sidebar.page-template-showcase-php #content {
margin: 0 7.6%;
width: auto;
}
.page-template-showcase-php section.recent-posts {
float: right;
margin: 0 0 0 31%;
width: 69%;
}
.page-template-showcase-php #main .widget-area {
float: left;
margin: 0 -22.15% 0 0;
width: 22.15%;
}<br /><br />/* error404 */
.error404 #primary {
float: none;
margin: 0;
}
.error404 #primary #content {
margin: 0 7.6%;
width: auto;
}<br /><br />/* 位置合わせ */
.alignleft {
display: inline;
float: left;
margin-right: 1.625em;
}
.alignright {
display: inline;
float: right;
margin-left: 1.625em;
}
.aligncenter {
clear: both;
display: block;
margin-left: auto;
margin-right: auto;
}<br /><br />/* 右のコンテンツ */
.left-sidebar #primary {
float: right;
margin: 0 0 0 -26.4%;
width: 100%;
}
.left-sidebar #content {
margin: 0 7.6% 0 34%;
width: 58.4%;
}
.left-sidebar #secondary {
float: left;
margin-left: 7.6%;
margin-right: 0;
width: 18.8%;
}<br /><br />/* ワンコラム */
.one-column #page {
max-width: 690px;
}
.one-column #content {
margin: 0 7.6%;
width: auto;
}
.one-column #nav-below {
border-bottom: 1px solid #ddd;
margin-bottom: 1.625em;
}
.one-column #secondary {
float: none;
margin: 0 7.6%;
width: auto;
}
/* ショーケーステンプレートをシンプルに */
.one-column .page-template-showcase-php section.recent-posts {
float: none;
margin: 0;
width: 100%;
}
.one-column .page-template-showcase-php #main .widget-area {
float: none;
margin: 0;
width: auto;
}
.one-column .page-template-showcase-php .other-recent-posts {
border-bottom: 1px solid #ddd;
}
/* 特集が小さいときにショーケーステンプレートをシンプルにします。 */
.one-column section.featured-post .attachment-small-feature {
border: none;
display: block;
height: auto;
max-width: 60%;
position: static;
}
.one-column article.feature-image.small {
margin: 0 0 1.625em;
padding: 0;
}
.one-column article.feature-image.small .entry-title {
font-size: 20px;
line-height: 1.3em;
}
.one-column article.feature-image.small .entry-summary {
height: 150px;
overflow: hidden;
padding: 0;
text-overflow: ellipsis;
}
.one-column article.feature-image.small .entry-summary a {
left: -9%;
}
/* シングル記事でマージンを削除します。 */
.one-column.singular .entry-header,
.one-column.singular .entry-content,
.one-column.singular footer.entry-meta,
.one-column.singular #comments-title {
width: 100%;
}
/* リード文とそのスタイルをシンプルにします。 */
.one-column.singular blockquote.pull {
margin: 0 0 1.625em;
}
.one-column.singular .pull.alignleft {
margin: 0 1.625em 0 0;
}
.one-column.singular .pull.alignright {
margin: 0 0 0 1.625em;
}
.one-column.singular .entry-meta .edit-link a {
position: absolute;
left: 0;
top: 40px;
}
.one-column.singular #author-info {
margin: 2.2em -8.8% 0;
padding: 20px 8.8%;
}
/* コメントアバター用に余裕を確保します。 */
.one-column .commentlist > li.comment {
margin-left: 102px;
width: auto;
}
/* ロゴと検索フォームがぶつからないようにします。 */
.one-column #branding #searchform {
right: 40px;
top: 4em;
}
/* アバターがこのサイズで過剰にスペースを占有します。 */
.one-column .commentlist > li.comment {
margin-left: 0;
}
.one-column .commentlist > li.comment .comment-meta,
.one-column .commentlist > li.comment .comment-content {
margin-right: 85px;
}
.one-column .commentlist .avatar {
background: transparent;
display: block;
padding: 0;
top: 1.625em;
left: auto;
right: 1.625em;
}
.one-column .commentlist .children .avatar {
background: none;
padding: 0;
position: absolute;
top: 2.2em;
left: 2.2em;
}
.one-column #respond {
width: auto;
}<br /><br />/* =グローバル
———————————————– */<br /><br />body, input, textarea {
color: #373737;
font: 15px "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 300;
line-height: 1.625;
}
body {
background: #e2e2e2;
}
#page {
background: #fff;
}<br /><br />/* 見出し */
h1,h2,h3,h4,h5,h6 {
clear: both;
}
hr {
background-color: #ccc;
border: 0;
height: 1px;
margin-bottom: 1.625em;
}<br /><br />/* テキスト要素 */
p {
margin-bottom: 1.625em;
}
ul, ol {
margin: 0 0 1.625em 2.5em;
}
ul {
list-style: square;
}
ol {
list-style-type: decimal;
}
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 1.625em;
}
dt {
font-weight: bold;
}
dd {
margin-bottom: 1.625em;
}
strong {
font-weight: bold;
}
cite, em, i {
font-style: italic;
}
blockquote {
font-family: Georgia, "Bitstream Charter", serif;
font-style: italic;
font-weight: normal;
margin: 0 3em;
}
blockquote em, blockquote i, blockquote cite {
font-style: normal;
}
blockquote cite {
color: #666;
font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 300;
letter-spacing: 0.05em;
text-transform: uppercase;
}
pre {
background: #f4f4f4;
font: 13px "Courier 10 Pitch", Courier, monospace;
line-height: 1.5;
margin-bottom: 1.625em;
overflow: auto;
padding: 0.75em 1.625em;
}
code, kbd {
font: 13px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace;
}
abbr, acronym, dfn {
border-bottom: 1px dotted #666;
cursor: help;
}
address {
display: block;
margin: 0 0 1.625em;
}
ins {
background: #fff9c0;
text-decoration: none;
}
sup,
sub {
font-size: 10px;
height: 0;
line-height: 1;
position: relative;
vertical-align: baseline;
}
sup {
bottom: 1ex;
}
sub {
top: .5ex;
}<br /><br />/* フォーム */
input[type=text],
input[type=password],
textarea {
background: #fafafa;
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
border: 1px solid #ddd;
color: #888;
}
input[type=text]:focus,
textarea:focus {
color: #373737;
}
textarea {
padding-left: 3px;
width: 98%;
}
input[type=text] {
padding: 3px;
}
input#s {
background: url(images/search.png) no-repeat 5px 6px;
-moz-border-radius: 2px;
border-radius: 2px;
font-size: 14px;
height: 22px;
line-height: 1.2em;
padding: 4px 10px 4px 28px;
}
input#searchsubmit {
display: none;
}<br /><br />/* リンク */
a {
color: #1982d1;
text-decoration: none;
}
a:focus,
a:active,
a:hover {
text-decoration: underline;
}<br /><br />/* ユニバーサルデザインのためのテキスト */
.assistive-text {
position: absolute !important;
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
}
#access a.assistive-text:active,
#access a.assistive-text:focus {
background: #eee;
border-bottom: 1px solid #ddd;
color: #1982d1;
clip: auto !important;
font-size: 12px;
position: absolute;
text-decoration: underline;
top: 0;
left: 7.6%;
}<br /><br />/* =ヘッダー
———————————————– */<br /><br />#branding {
border-top: 2px solid #bbb;
padding-bottom: 10px;
position: relative;
z-index: 2;
}
#site-title {
margin-right: 270px;
padding: 3.65625em 0 0;
}
#site-title a {
color: #111;
font-size: 30px;
font-weight: bold;
line-height: 36px;
text-decoration: none;
}
#site-title a:hover,
#site-title a:focus,
#site-title a:active {
color: #1982d1;
}
#site-description {
color: #7a7a7a;
font-size: 14px;
margin: 0 270px 3.65625em 0;
}
#branding img {
height: auto;
margin-bottom: -7px;
width: 100%;
}<br /><br />/* =メニュー
————————————————————– */<br /><br />#access {
background: #222; /* 古いブラウザ向けに無地の色を表示します。 */
background: -moz-linear-gradient(#252525, #0a0a0a);
background: -o-linear-gradient(#252525, #0a0a0a);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#252525), to(#0a0a0a)); /* 古い webkit 向けのシンタックス */
background: -webkit-linear-gradient(#252525, #0a0a0a);
-webkit-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
-moz-box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
box-shadow: rgba(0, 0, 0, 0.4) 0px 1px 2px;
clear: both;
display: block;
float: left;
margin: 0 auto 6px;
width: 100%;
}
#access ul {
font-size: 13px;
list-style: none;
margin: 0 0 0 -0.8125em;
padding-left: 0;
}
#access li {
float: left;
position: relative;
}
#access a {
color: #eee;
display: block;
line-height: 3.333em;
padding: 0 1.2125em;
text-decoration: none;
}
#access ul ul {
-moz-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
-webkit-box-shadow: 0 3px 3px rgba(0,0,0,0.2);
box-shadow: 0 3px 3px rgba(0,0,0,0.2);
display: none;
float: left;
margin: 0;
position: absolute;
top: 3.333em;
left: 0;
width: 188px;
z-index: 99999;
}
#access ul ul ul {
left: 100%;
top: 0;
}
#access ul ul a {
background: #f9f9f9;
border-bottom: 1px dotted #ddd;
color: #444;
font-size: 13px;
font-weight: normal;
height: auto;
line-height: 1.4em;
padding: 10px 10px;
width: 168px;
}
#access li:hover > a,
#access ul ul :hover > a,
#access a:focus {
background: #efefef;
}
#access li:hover > a,
#access a:focus {
background: #f9f9f9; /* 古いブラウザ向けに無地の色を表示します。 */
background: -moz-linear-gradient(#f9f9f9, #e5e5e5);
background: -o-linear-gradient(#f9f9f9, #e5e5e5);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f9f9f9), to(#e5e5e5)); /* 古い webkit 向けのシンタックス */
background: -webkit-linear-gradient(#f9f9f9, #e5e5e5);
color: #373737;
}
#access ul li:hover > ul {
display: block;
}
#access .current_page_item > a,
#access .current_page_ancestor > a {
font-weight: bold;
}<br /><br />/* 検索フォーム */
#branding #searchform {
position: absolute;
top: 3.8em;
right: 7.6%;
text-align: right;
}
#branding #searchform div {
margin: 0;
}
#branding #s {
float: right;
-webkit-transition-duration: 400ms;
-webkit-transition-property: width, background;
-webkit-transition-timing-function: ease;
-moz-transition-duration: 400ms;
-moz-transition-property: width, background;
-moz-transition-timing-function: ease;
-o-transition-duration: 400ms;
-o-transition-property: width, background;
-o-transition-timing-function: ease;
width: 72px;
}
#branding #s:focus {
background-color: #f9f9f9;
width: 196px;
}
#branding #searchsubmit {
display: none;
}
#branding .only-search #searchform {
top: 5px;
z-index: 1;
}
#branding .only-search #s {
background-color: #666;
border-color: #000;
color: #222;
}
#branding .only-search #s,
#branding .only-search #s:focus {
width: 85%;
}
#branding .only-search #s:focus {
background-color: #bbb;
}
#branding .with-image #searchform {
top: auto;
bottom: -27px;
max-width: 195px;
}
#branding .only-search + #access div {
padding-right: 205px;
}<br /><br />/* =コンテンツ
———————————————– */<br /><br />#main {
clear: both;
padding: 1.625em 0 0;
}
.page-title {
color: #666;
font-size: 10px;
font-weight: 500;
letter-spacing: 0.1em;
line-height: 2.6em;
margin: 0 0 2.6em;
text-transform: uppercase;
}
.page-title a {
font-size: 12px;
font-weight: bold;
letter-spacing: 0;
text-transform: none;
}
.hentry,
.no-results {
border-bottom: 1px solid #ddd;
margin: 0 0 1.625em;
padding: 0 0 1.625em;
position: relative;
}
.hentry:last-child,
.no-results {
border-bottom: none;
}
.blog .sticky .entry-header .entry-meta {
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
position: absolute !important;
}
.entry-title,
.entry-header .entry-meta {
padding-right: 76px;
}
.entry-title {
clear: both;
color: #222;
font-size: 26px;
font-weight: bold;
line-height: 1.5em;
padding-bottom: .3em;
padding-top: 15px;
}
.entry-title,
.entry-title a {
color: #222;
text-decoration: none;
}
.entry-title a:hover,
.entry-title a:focus,
.entry-title a:active {
color: #1982d1;
}
.entry-meta {
color: #666;
clear: both;
font-size: 12px;
line-height: 18px;
}
.entry-meta a {
font-weight: bold;
}
.single-author .entry-meta .by-author {
display: none;
}
.entry-content,
.entry-summary {
padding: 1.625em 0 0;
}
.entry-content h1,
.entry-content h2,
.comment-content h1,
.comment-content h2 {
color: #000;
font-weight: bold;
margin: 0 0 .8125em;
}
.entry-content h3,
.comment-content h3 {
font-size: 10px;
letter-spacing: 0.1em;
line-height: 2.6em;
text-transform: uppercase;
}
.entry-content table,
.comment-content table {
border-bottom: 1px solid #ddd;
margin: 0 0 1.625em;
width: 100%;
}
.entry-content th,
.comment-content th {
color: #666;
font-size: 10px;
font-weight: 500;
letter-spacing: 0.1em;
line-height: 2.6em;
text-transform: uppercase;
}
.entry-content td,
.comment-content td {
border-top: 1px solid #ddd;
padding: 6px 10px 6px 0;
}
.entry-content #s {
width: 75%;
}
.comment-content ul,
.comment-content ol {
margin-bottom: 1.625em;
}
.comment-content ul ul,
.comment-content ol ol,
.comment-content ul ol,
.comment-content ol ul {
margin-bottom: 0;
}
dl.gallery-item {
margin: 0;
}
.page-link {
clear: both;
display: block;
margin: 0 0 1.625em;
}
.page-link a {
background: #eee;
color: #373737;
margin: 0;
padding: 2px 3px;
text-decoration: none;
}
.page-link a:hover {
background: #888;
color: #fff;
font-weight: bold;
}
.page-link span {
margin-right: 6px;
}
.entry-meta .edit-link a,
.commentlist .edit-link a {
background: #eee;
-moz-border-radius: 3px;
border-radius: 3px;
color: #666;
float: right;
font-size: 12px;
line-height: 1.5em;
font-weight: 300;
text-decoration: none;
padding: 0 8px;
}
.entry-meta .edit-link a:hover,
.commentlist .edit-link a:hover {
background: #888;
color: #fff;
}
.entry-content .edit-link {
clear: both;
display: block;
}<br /><br />/* 画像 */
.entry-content img,
.comment-content img,
.widget img {
max-width: 97.5%; /* 投稿、コメント、ウィジェット用の可変サイズの画像 */
}
img[class*="align"],
img[class*="wp-image-"] {
height: auto; /* WordPress が追加した height と width 属性でも画像が正しくスケールするようにします。 */
}
img.size-full {
max-width: 97.5%;
width: auto; /* IE8 の height ・width 属性によってフルサイズの画像が広がるのを防ぎます。 */
}
.entry-content img.wp-smiley {
border: none;
margin-bottom: 0;
margin-top: 0;
padding: 0;
}
img.alignleft,
img.alignright,
img.aligncenter {
margin-bottom: 1.625em;
}
p img,
.wp-caption {
margin-top: 0.4em;
}
.wp-caption {
background: #eee;
margin-bottom: 1.625em;
max-width: 96%;
padding: 9px;
}
.wp-caption img {
display: block;
margin: 0 auto;
max-width: 98%;
}
.wp-caption .wp-caption-text,
.gallery-caption {
color: #666;
font-family: Georgia, serif;
font-size: 12px;
}
.wp-caption .wp-caption-text {
margin-bottom: 0.6em;
padding: 10px 0 5px 40px;
position: relative;
}
.wp-caption .wp-caption-text:before {
color: #666;
content: ‘\2014’;
font-size: 14px;
font-style: normal;
font-weight: bold;
margin-right: 5px;
position: absolute;
left: 10px;
top: 7px;
}
#content .gallery {
margin: 0 auto 1.625em;
}
#content .gallery a img {
border: none;
}
img#wpstats {
display: block;
margin: 0 auto 1.625em;
}
#content .gallery-columns-4 .gallery-item {
width: 23%;
padding-right: 2%;
}
#content .gallery-columns-4 .gallery-item img {
width: 100%;
height: auto;
}<br /><br />/* 画像のボーダー */
img[class*="align"],
img[class*="wp-image-"],
#content .gallery .gallery-icon img {/* バッジやアイコンを除き、WordPress が追加した画像すべてにファンシーなボーダーを追加します。 */
border: 1px solid #ddd;
padding: 6px;
}
.wp-caption img {
border-color: #eee;
}
a:focus img[class*="align"],
a:hover img[class*="align"],
a:active img[class*="align"],
a:focus img[class*="wp-image-"],
a:hover img[class*="wp-image-"],
a:active img[class*="wp-image-"],
#content .gallery .gallery-icon a:focus img,
#content .gallery .gallery-icon a:hover img,
#content .gallery .gallery-icon a:active img {/* リンクのついた画像のファンシーなボーダーに便利なスタイルを追加します。 */
background: #eee;
border-color: #bbb;
}
.wp-caption a:focus img,
.wp-caption a:active img,
.wp-caption a:hover img {/* … キャプション付きの画像も含みます! */
background: #fff;
border-color: #ddd;
}<br /><br />/* パスワードで保護された投稿 */
.post-password-required .entry-header .comments-link {
margin: 1.625em 0 0;
}
.post-password-required input[type=password] {
margin: 0.8125em 0;
}
.post-password-required input[type=password]:focus {
background: #f7f7f7;
}<br /><br />/* 作成者情報 */
#author-info {
font-size: 12px;
overflow: hidden;
}
.singular #author-info {
background: #f9f9f9;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 2.2em -35.6% 0 -35.4%;
padding: 20px 35.4%;
}
.archive #author-info {
border-bottom: 1px solid #ddd;
margin: 0 0 2.2em;
padding: 0 0 2.2em;
}
#author-avatar {
float: left;
margin-right: -78px;
}
#author-avatar img {
background: #fff;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 2px #bbb;
-moz-box-shadow: 0 1px 2px #bbb;
box-shadow: 0 1px 2px #bbb;
padding: 3px;
}
#author-description {
float: left;
margin-left: 108px;
}
#author-description h2 {
color: #000;
font-size: 15px;
font-weight: bold;
margin: 5px 0 10px;
}<br /><br />/* コメントリンク */
.entry-header .comments-link a {
background: #eee url(images/comment-bubble.png) no-repeat;
color: #666;
font-size: 13px;
font-weight: normal;
line-height: 35px;
overflow: hidden;
padding: 0 0 0;
position: absolute;
top: 1.5em;
right: 0;
text-align: center;
text-decoration: none;
width: 43px;
height: 36px;
}
.entry-header .comments-link a:hover,
.entry-header .comments-link a:focus,
.entry-header .comments-link a:active {
background-color: #1982d1;
color: #fff;
color: rgba(255,255,255,0.8);
}
.entry-header .comments-link .leave-reply {
visibility: hidden;
}<br /><br />/*
投稿フォーマットの見出し
見出しを隠すには ".entry-header .entry-format" セレクタに display: none を追加して
下の paading ルールを削除してください。
*/
.entry-header .entry-format {
color: #666;
font-size: 10px;
font-weight: 500;
letter-spacing: 0.1em;
line-height: 2.6em;
position: absolute;
text-transform: uppercase;
top: -5px;
}
.entry-header hgroup .entry-title {
padding-top: 15px;
}
article.format-aside .entry-content,
article.format-link .entry-content,
article.format-status .entry-content {
padding: 20px 0 0;
}
.recent-posts .entry-header .entry-format {
display: none;
}
.recent-posts .entry-header hgroup .entry-title {
padding-top: 0;
}<br /><br />/* 投稿と固定ページ用のシングルコンテンツスタイル */
.singular .hentry {
border-bottom: none;
padding: 4.875em 0 0;
position: relative;
}
.singular.page .hentry {
padding: 3.5em 0 0;
}
.singular .entry-title {
color: #000;
font-size: 36px;
font-weight: bold;
line-height: 48px;
}
.singular .entry-title,
.singular .entry-header .entry-meta {
padding-right: 0;
}
.singular .entry-header .entry-meta {
position: absolute;
top: 0;
left: 0;
}
blockquote.pull {
font-size: 21px;
font-weight: bold;
line-height: 1.6125em;
margin: 0 0 1.625em;
text-align: center;
}
.singular blockquote.pull {
margin: 0 -22.25% 1.625em;
}
.pull.alignleft {
margin: 0 1.625em 0 0;
text-align: right;
width: 33%;
}
.singular .pull.alignleft {
margin: 0 1.625em 0 -22.25%;
}
.pull.alignright {
margin: 0 0 0 1.625em;
text-align: left;
width: 33%;
}
.singular .pull.alignright {
margin: 0 -22.25% 0 1.625em;
}
.singular blockquote.pull.alignleft,
.singular blockquote.pull.alignright {
width: 33%;
}
.singular .entry-meta .edit-link a {
bottom: auto;
left: 50px;
position: absolute;
right: auto;
top: 80px;
}<br /><br />/* =アサイド
———————————————– */<br /><br />.format-aside .entry-title,
.format-aside .entry-header .comments-link {
display: none;
}
.singular .format-aside .entry-title {
display: block;
}
.format-aside .entry-content {
padding: 0;
}
.singular .format-aside .entry-content {
padding: 1.625em 0 0;
}<br /><br />/* =リンク
———————————————– */<br /><br />.format-link .entry-title,
.format-link .entry-header .comments-link {
display: none;
}
.singular .format-link .entry-title {
display: block;
}
.format-link .entry-content {
padding: 0;
}
.singular .format-link .entry-content {
padding: 1.625em 0 0;
}<br /><br />/* =ギャラリー
———————————————– */<br /><br />.format-gallery .gallery-thumb {
float: left;
display: block;
margin: .375em 1.625em 0 0;
}<br /><br />/* =ステータス
———————————————– */<br /><br />.format-status .entry-title,
.format-status .entry-header .comments-link {
display: none;
}
.singular .format-status .entry-title {
display: block;
}
.format-status .entry-content {
padding: 0;
}
.singular .format-status .entry-content {
padding: 1.625em 0 0;
}
.format-status img.avatar {
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 2px #ccc;
-moz-box-shadow: 0 1px 2px #ccc;
box-shadow: 0 1px 2px #ccc;
float: left;
margin: 4px 10px 2px 0;
padding: 0;
}<br /><br />/* =引用
———————————————– */<br /><br />.format-quote blockquote {
color: #555;
font-size: 17px;
margin: 0;
}<br /><br />/* =画像
———————————————– */<br /><br />.indexed.format-image .entry-header {
min-height: 61px; /* コメントアイコンが画像にタイトルがないときにぶつかるのを防ぎます。 */
}
.indexed.format-image .entry-content {
padding-top: 0.5em;
}
.indexed.format-image p,
.indexed.format-image p img {
margin-bottom: 0;
}
.indexed.format-image footer.entry-meta {
background: #ddd;
margin-top: -7px;
padding: 20px 30px;
overflow: hidden;
}
.indexed.format-image div.entry-meta {
display: inline-block;
float: left;
width: 35%;
}
.indexed.format-image div.entry-meta + div.entry-meta {
float: none;
width: 65%;
}
.indexed.format-image .entry-meta span.cat-links,
.indexed.format-image .entry-meta span.tag-links,
.indexed.format-image .entry-meta span.comments-link {
display: block;
}
.indexed.format-image footer.entry-meta a {
color: #444;
}
.indexed.format-image footer.entry-meta a:hover {
color: #fff;
}
#content .indexed.format-image img {
border: none;
max-width: 100%;
padding: 0;
}
.indexed.format-image .wp-caption {
background: #111;
margin-bottom: 0;
max-width: 96%;
padding: 11px;
}
.indexed.format-image .wp-caption .wp-caption-text {
color: #ddd;
}
.indexed.format-image .wp-caption .wp-caption-text:before {
color: #444;
}
.indexed.format-image a:hover img {
opacity: 0.8;
}<br /><br />/* =error404
———————————————– */<br /><br />.error404 #main #searchform {
background: #f9f9f9;
border: 1px solid #ddd;
border-width: 1px 0;
margin: 0 -8.9% 1.625em;
overflow: hidden;
padding: 1.625em 8.9%;
}
.error404 #main #s {
width: 95%;
}
.error404 #main .widget {
clear: none;
float: left;
margin-right: 3.7%;
width: 30.85%;
}
.error404 #main .widget_archive {
margin-right: 0;
}
.error404 #main .widget_tag_cloud {
float: none;
margin-right: 0;
width: 100%;
}
.error404 .widgettitle {
font-size: 10px;
letter-spacing: 0.1em;
line-height: 2.6em;
text-transform: uppercase;
}<br /><br />/* =ショーケース
———————————————– */<br /><br />h1.showcase-heading {
color: #666;
font-size: 10px;
font-weight: 500;
letter-spacing: 0.1em;
line-height: 2.6em;
text-transform: uppercase;
}<br /><br />/* イントロ */
article.intro {
background: #f9f9f9;
border-bottom: none;
margin: -1.855em -8.9% 1.625em;
padding: 0 8.9%;
}
article.intro .entry-title {
display: none;
}
article.intro .entry-content {
color: #111;
font-size: 16px;
padding: 1.625em 0 0.625em;
}
article.intro .edit-link a {
background: #aaa;
-moz-border-radius: 3px;
border-radius: 3px;
color: #fff;
font-size: 12px;
padding: 0 8px;
position: absolute;
top: 30px;
right: 20px;
text-decoration: none;
}
article.intro .edit-link a:hover,
article.intro .edit-link a:focus,
article.intro .edit-link a:active {
background: #777;
}<br /><br />/* 注目記事 */
section.featured-post {
float: left;
margin: -1.625em -8.9% 1.625em;
padding: 1.625em 8.9% 0;
position: relative;
width: 100%;
}
section.featured-post .hentry {
border: none;
color: #666;
margin: 0;
}
section.featured-post .entry-meta {
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
clip: rect(1px, 1px, 1px, 1px);
position: absolute !important;
}<br /><br />/* 小さい注目記事 */
section.featured-post .attachment-small-feature {
float: right;
height: auto;
margin: 0 -8.9% 1.625em 0;
max-width: 59%;
position: relative;
right: -15px;
}
section.featured-post.small {
padding-top: 0;
}
section.featured-post .attachment-small-feature:hover,
section.featured-post .attachment-small-feature:focus,
section.featured-post .attachment-small-feature:active {
opacity: .8;
}
article.feature-image.small {
float: left;
margin: 0 0 1.625em;
width: 45%;
}
article.feature-image.small .entry-title {
line-height: 1.2em;
}
article.feature-image.small .entry-summary {
color: #555;
font-size: 13px;
}
article.feature-image.small .entry-summary p a {
background: #222;
color: #eee;
display: block;
left: -23.8%;
padding: 9px 26px 9px 85px;
position: relative;
text-decoration: none;
top: 20px;
width: 180px;
z-index: 1;
}
article.feature-image.small .entry-summary p a:hover {
background: #1982d1;
color: #eee;
color: rgba(255,255,255,0.8);
}<br /><br />/* 大きな注目記事 */
section.feature-image.large {
border: none;
max-height: 288px;
padding: 0;
width: 100%;
}
section.feature-image.large .showcase-heading {
display: none;
}
section.feature-image.large .hentry {
border-bottom: none;
left: 9%;
margin: 1.625em 9% 0 0;
position: absolute;
top: 0;
}
article.feature-image.large .entry-title a {
background: #222;
background: rgba(0,0,0,0.8);
-moz-border-radius: 3px;
border-radius: 3px;
color: #fff;
display: inline-block;
font-weight: 300;
padding: .2em 20px;
}
section.feature-image.large:hover .entry-title a,
section.feature-image.large .entry-title:hover a {
background: #eee;
background: rgba(255,255,255,0.8);
color: #222;
}
article.feature-image.large .entry-summary {
display: none;
}
section.feature-image.large img {
display: block;
height: auto;
max-width: 117.9%;
padding: 0 0 6px;
}<br /><br />/* 注目記事のスライダー */
.featured-posts {
border-bottom: 1px solid #ddd;
display: block;
height: 328px;
margin: 1.625em -8.9% 20px;
max-width: 1000px;
padding: 0;
position: relative;
overflow: hidden;
}
.featured-posts .showcase-heading {
padding-left: 8.9%;
}
.featured-posts section.featured-post {
background: #fff;
height: 288px;
left: 0;
margin: 0;
position: absolute;
top: 30px;
width: auto;
}
.featured-posts section.featured-post.large {
max-width: 100%;
overflow: hidden;
}
.featured-posts section.featured-post {
-webkit-transition-duration: 200ms;
-webkit-transition-property: opacity, visibility;
-webkit-transition-timing-function: ease;
-moz-transition-duration: 200ms;
-moz-transition-property: opacity, visibility;
-moz-transition-timing-function: ease;
}
.featured-posts section.featured-post {
opacity: 0;
visibility: hidden;
}
.featured-posts #featured-post-1 {
opacity: 1;
visibility: visible;
}
.featured-post .feature-text:after,
.featured-post .feature-image.small:after {
content: ‘ ‘;
background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,0)), color-stop(100%,rgba(255,255,255,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=’#00ffffff’, endColorstr=’#ffffff’,GradientType=0 ); /* IE6-9 */
background: linear-gradient(top, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 100%); /* W3C */
width: 100%;
height: 45px;
position: absolute;
top: 230px;
}
.featured-post .feature-image.small:after {
top: 253px;
}
#content .feature-slider {
top: 5px;
right: 8.9%;
overflow: visible;
position: absolute;
}
.feature-slider ul {
list-style-type: none;
margin: 0;
}
.feature-slider li {
float: left;
margin: 0 6px;
}
.feature-slider a {
background: #3c3c3c;
background: rgba(60,60,60,0.9);
-moz-border-radius: 12px;
border-radius: 12px;
-webkit-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5);
-moz-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5);
box-shadow: inset 1px 1px 5px rgba(0,0,0,0.5), inset 0 0 2px rgba(255,255,255,0.5);
display: block;
width: 14px;
height: 14px;
}
.feature-slider a.active {
background: #1982d1;
-webkit-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8);
-moz-box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8);
box-shadow: inset 1px 1px 5px rgba(0,0,0,0.4), inset 0 0 2px rgba(255,255,255,0.8);
cursor: default;
opacity: 0.5;
}<br /><br />/* 最近の投稿 */
section.recent-posts {
padding: 0 0 1.625em;
}
section.recent-posts .hentry {
border: none;
margin: 0;
}
section.recent-posts .other-recent-posts {
border-bottom: 1px solid #ddd;
list-style: none;
margin: 0;
}
section.recent-posts .other-recent-posts li {
padding: 0.3125em 0;
position: relative;
}
section.recent-posts .other-recent-posts .entry-title {
border-top: 1px solid #ddd;
font-size: 17px;
}
section.recent-posts .other-recent-posts a[rel="bookmark"] {
color: #373737;
float: left;
max-width: 84%;
}
section.recent-posts .other-recent-posts a[rel="bookmark"]:after {
content: ‘-‘;
color: transparent;
font-size: 11px;
}
section.recent-posts .other-recent-posts a[rel="bookmark"]:hover {
}
section.recent-posts .other-recent-posts .comments-link a,
section.recent-posts .other-recent-posts .comments-link > span {
border-bottom: 2px solid #999;
bottom: -2px;
color: #444;
display: block;
font-size: 10px;
font-weight: 500;
line-height: 2.76333em;
padding: 0.3125em 0 0.3125em 1em;
position: absolute;
right: 0;
text-align: right;
text-transform: uppercase;
z-index: 1;
}
section.recent-posts .other-recent-posts .comments-link > span {
border-color: #bbb;
color: #888;
}
section.recent-posts .other-recent-posts .comments-link a:hover {
color: #1982d1;
border-color: #1982d1;
}
section.recent-posts .other-recent-posts li:after {
clear: both;
content: ‘.’;
display: block;
height: 0;
visibility: hidden;
}<br /><br />/* =添付
———————————————– */<br /><br />.image-attachment div.attachment {
background: #f9f9f9;
border: 1px solid #ddd;
border-width: 1px 0;
margin: 0 -8.9% 1.625em;
overflow: hidden;
padding: 1.625em 1.625em 0;
text-align: center;
}
.image-attachment div.attachment img {
display: block;
height: auto;
margin: 0 auto 1.625em;
max-width: 100%;
}
.image-attachment div.attachment a img {
border-color: #f9f9f9;
}
.image-attachment div.attachment a:focus img,
.image-attachment div.attachment a:hover img,
.image-attachment div.attachment a:active img {
border-color: #ddd;
background: #fff;
}
.image-attachment .entry-caption p {
font-size: 10px;
letter-spacing: 0.1em;
line-height: 2.6em;
margin: 0 0 2.6em;
text-transform: uppercase;
}<br /><br />/* =ナビゲーション
————————————————————– */<br /><br />#content nav {
clear: both;
overflow: hidden;
padding: 0 0 1.625em;
}
#content nav a {
font-size: 12px;
font-weight: bold;
line-height: 2.2em;
}
#nav-above {
padding: 0 0 1.625em;
}
#nav-above {
display: none;
}
.paged #nav-above {
display: block;
}
.nav-previous {
float: left;
width: 50%;
}
.nav-next {
float: right;
text-align: right;
width: 50%;
}
#content nav .meta-nav {
font-weight: normal;
}<br /><br />/* シングルナビゲーション */
#nav-single {
float: right;
position: relative;
top: -0.3em;
text-align: right;
width: 100%;
z-index: 1;
}
#nav-single .nav-previous,
#nav-single .nav-next {
float: none;
width: auto;
}
#nav-single .nav-next {
padding-left: .5em;
}<br /><br />/* =ウィジェット
———————————————– */<br /><br />.widget-area {
font-size: 12px;
}
.widget {
clear: both;
margin: 0 0 2.2em;
}
.widget-title {
color: #666;
font-size: 10px;
font-weight: 500;
letter-spacing: 0.1em;
line-height: 2.6em;
text-transform: uppercase;
}
.widget ul {
font-size: 15px;
margin: 0;
}
.widget ul ul {
margin-left: 1.5em;
}
.widget ul li {
color: #777;
font-size: 13px;
}
.widget a {
font-weight: bold;
text-decoration: none;
}
.widget a:hover,
.widget a:focus,
.widget a:active {
text-decoration: underline;
}<br /><br />/* 検索ウィジェット */
.widget_search form {
margin: 0 0 1.625em;
}
.widget_search #s {
width: 77%;
}
.widget_search #searchsubmit {
background: #ddd;
border: 1px solid #ccc;
-webkit-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
-moz-box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
box-shadow: inset 0px -1px 1px rgba(0, 0, 0, 0.09);
color: #888;
font-size: 13px;
line-height: 25px;
position: relative;
top: -2px;
}
.widget_search #searchsubmit:active {
background: #1982d1;
border-color: #0861a5;
-webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
-moz-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.1);
color: #bfddf3;
}<br /><br />/* 短冊ウィジェット */
section.ephemera ol,
.widget_twentyeleven_ephemera ol {
list-style: square;
margin: 5px 0 0;
}
.widget_twentyeleven_ephemera .widget-entry-title {
font-size: 15px;
font-weight: bold;
padding: 0;
}
.widget_twentyeleven_ephemera .comments-link a,
.widget_twentyeleven_ephemera .comments-link > span {
color: #666;
display: block;
font-size: 10px;
font-weight: 500;
line-height: 2.76333em;
text-transform: uppercase;
}
section.ephemera .entry-title .comments-link a:hover,
.widget_twentyeleven_ephemera .entry-title .comments-link a:hover {
}
section.ephemera .entry-title a span {
color: #29628d;
}<br /><br />/* Twitter */
.widget_twitter li {
list-style-type: none;
margin-bottom: 14px;
}
.widget_twitter .timesince {
display: block;
font-size: 11px;
margin-right: -10px;
text-align: right;
}<br /><br />/* Widget Image */
.widget_image img {
height: auto;
max-width: 100%;
}<br /><br />/* カレンダーウィジェット */<br /><br />.widget_calendar #wp-calendar {
color: #555;
width: 95%;
text-align: center;
}
.widget_calendar #wp-calendar caption,
.widget_calendar #wp-calendar td,
.widget_calendar #wp-calendar th {
text-align: center;
}
.widget_calendar #wp-calendar caption {
font-size: 11px;
font-weight: 500;
padding: 5px 0 3px 0;
text-transform: uppercase;
}
.widget_calendar #wp-calendar th {
background: #f4f4f4;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
font-weight: bold;
}
.widget_calendar #wp-calendar tfoot td {
background: #f4f4f4;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}<br /><br />/* =コメント
———————————————– */<br /><br />#comments-title {
color: #666;
font-size: 10px;
font-weight: 500;
line-height: 2.6em;
padding: 0 0 2.6em;
text-transform: uppercase;
}
.nopassword,
.nocomments {
color: #aaa;
font-size: 24px;
font-weight: 100;
margin: 26px 0;
text-align: center;
}
.commentlist {
list-style: none;
margin: 0 auto;
width: 68.9%;
}
.content .commentlist,
.page-template-sidebar-page-php .commentlist {
width: 100%; /* ワンコラム・サイドバーの固定ページレイアウト向けに width をリセットします。 */
}
.commentlist > li.comment {
background: #f6f6f6;
border: 1px solid #ddd;
-moz-border-radius: 3px;
border-radius: 3px;
margin: 0 0 1.625em;
padding: 1.625em;
position: relative;
}
.commentlist .pingback {
margin: 0 0 1.625em;
padding: 0 1.625em;
}
.commentlist .children {
list-style: none;
margin: 0;
}
.commentlist .children li.comment {
background: #fff;
border-left: 1px solid #ddd;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
margin: 1.625em 0 0;
padding: 1.625em;
position: relative;
}
.commentlist .children li.comment .fn {
display: block;
}
.comment-meta .fn {
font-style: normal;
}
.comment-meta {
color: #666;
font-size: 12px;
line-height: 2.2em;
}
.commentlist .children li.comment .comment-meta {
line-height: 1.625em;
margin-left: 50px;
}
.commentlist .children li.comment .comment-content {
margin: 1.625em 0 0;
}
.comment-meta a {
font-weight: bold;
}
.comment-meta a:focus,
.comment-meta a:active,
.comment-meta a:hover {
}
.commentlist .avatar {
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 2px #ccc;
-moz-box-shadow: 0 1px 2px #ccc;
box-shadow: 0 1px 2px #ccc;
left: -102px;
padding: 0;
position: absolute;
top: 0;
}
.commentlist > li:before {
content: url(images/comment-arrow.png);
left: -21px;
position: absolute;
}
.commentlist > li.pingback:before {
content: ”;
}
.commentlist .children .avatar {
background: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
left: 2.2em;
padding: 0;
top: 2.2em;
}
a.comment-reply-link {
background: #eee;
-moz-border-radius: 3px;
border-radius: 3px;
color: #666;
display: inline-block;
font-size: 12px;
padding: 0 8px;
text-decoration: none;
}
a.comment-reply-link:hover,
a.comment-reply-link:focus,
a.comment-reply-link:active {
background: #888;
color: #fff;
}
a.comment-reply-link > span {
display: inline-block;
position: relative;
top: -1px;
}<br /><br />/* 投稿の作成者をハイライトします。 */
.commentlist > li.bypostauthor {
background: #ddd;
border-color: #d3d3d3;
}
.commentlist > li.bypostauthor .comment-meta {
color: #575757;
}
.commentlist > li.bypostauthor .comment-meta a:focus,
.commentlist > li.bypostauthor .comment-meta a:active,
.commentlist > li.bypostauthor .comment-meta a:hover {
}
.commentlist > li.bypostauthor:before {
content: url(images/comment-arrow-bypostauthor.png);
}<br /><br />/* 投稿の作成者のコメントをスレッド表示します。 */
.commentlist .children > li.bypostauthor {
background: #ddd;
border-color: #d3d3d3;
}<br /><br />/* sidebar-page.php のコメント */
/* コメントのアバターのために余裕を設けます。 */
.page-template-sidebar-page-php .commentlist > li.comment,
.page-template-sidebar-page-php.commentlist .pingback {
margin-left: 102px;
width: auto;
}
/* full-width のコメントフォーム */
.page-template-sidebar-page-php #respond {
width: auto;
}<br /><br />/* コメントフォーム */
#respond {
background: #ddd;
border: 1px solid #d3d3d3;
-moz-border-radius: 3px;
border-radius: 3px;
margin: 0 auto 1.625em;
padding: 1.625em;
position: relative;
width: 68.9%;
}
#respond input[type="text"],
#respond textarea {
background: #fff;
border: 4px solid #eee;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: inset 0 1px 3px rgba(204,204,204,0.95);
-moz-box-shadow: inset 0 1px 3px rgba(204,204,204,0.95);
box-shadow: inset 0 1px 3px rgba(204,204,204,0.95);
position: relative;
padding: 10px;
text-indent: 80px;
}
#respond .comment-form-author,
#respond .comment-form-email,
#respond .comment-form-url,
#respond .comment-form-comment {
position: relative;
}
#respond .comment-form-author label,
#respond .comment-form-email label,
#respond .comment-form-url label,
#respond .comment-form-comment label {
background: #eee;
-webkit-box-shadow: 1px 2px 2px rgba(204,204,204,0.8);
-moz-box-shadow: 1px 2px 2px rgba(204,204,204,0.8);
box-shadow: 1px 2px 2px rgba(204,204,204,0.8);
color: #555;
display: inline-block;
font-size: 13px;
left: 4px;
min-width: 60px;
padding: 4px 10px;
position: relative;
top: 40px;
z-index: 1;
}
#respond input[type="text"]:focus,
#respond textarea:focus {
text-indent: 0;
z-index: 1;
}
#respond textarea {
resize: vertical;
width: 95%;
}
#respond .comment-form-author .required,
#respond .comment-form-email .required {
color: #bd3500;
font-size: 22px;
font-weight: bold;
left: 75%;
position: absolute;
top: 45px;
z-index: 1;
}
#respond .comment-notes,
#respond .logged-in-as {
font-size: 13px;
}
#respond p {
margin: 10px 0;
}
#respond .form-submit {
float: right;
margin: -20px 0 10px;
}
#respond input#submit {
background: #222;
border: none;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
color: #eee;
cursor: pointer;
font-size: 15px;
margin: 20px 0;
padding: 5px 42px 5px 22px;
position: relative;
left: 30px;
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}
#respond input#submit:active {
background: #1982d1;
color: #bfddf3;
}
#respond #cancel-comment-reply-link {
color: #666;
margin-left: 10px;
text-decoration: none;
}
#respond .logged-in-as a:hover,
#respond #cancel-comment-reply-link:hover {
text-decoration: underline;
}
.commentlist #respond {
margin: 1.625em 0 0;
width: auto;
}
#reply-title {
color: #373737;
font-size: 24px;
font-weight: bold;
line-height: 30px;
}
#cancel-comment-reply-link {
color: #888;
display: block;
font-size: 10px;
font-weight: normal;
line-height: 2.2em;
letter-spacing: 0.05em;
position: absolute;
right: 1.625em;
text-decoration: none;
text-transform: uppercase;
top: 1.1em;
}
#cancel-comment-reply-link:focus,
#cancel-comment-reply-link:active,
#cancel-comment-reply-link:hover {
color: #ff4b33;
}
#respond label {
line-height: 2.2em;
}
#respond input[type=text] {
display: block;
height: 24px;
width: 75%;
}
#respond p {
font-size: 12px;
}
p.comment-form-comment {
margin: 0;
}
.form-allowed-tags {
display: none;
}<br /><br />/* =フッター
———————————————– */<br /><br />#colophon {
clear: both;
}
#supplementary {
border-top: 1px solid #ddd;
padding: 1.625em 7.6%;
overflow: hidden;
}<br /><br />/* 2つ目のフッターウィジェットエリア */
#supplementary.two .widget-area {
float: left;
margin-right: 3.7%;
width: 48.1%;
}
#supplementary.two .widget-area + .widget-area {
margin-right: 0;
}<br /><br />/* 3つ目のフッターウィジェットエリア */
#supplementary.three .widget-area {
float: left;
margin-right: 3.7%;
width: 30.85%;
}
#supplementary.three .widget-area + .widget-area + .widget-area {
margin-right: 0;
}<br /><br />/* サイトジェネレータライン */
#site-generator {
background: #f9f9f9;
border-top: 1px solid #ddd;
color: #666;
font-size: 12px;
line-height: 2.2em;
padding: 2.2em 0.5em;
text-align: center;
}
#site-generator a {
color: #555;
font-weight: bold;
}
#site-generator .sep {
background: url(images/wordpress.png) center left no-repeat;
color: transparent;
display: inline-block;
height: 16px;
line-height: 16px;
margin: 0 7px;
width: 16px;
}<br /><br />/* =レスポンシブ構造
———————————————– */<br /><br />@media (max-width: 800px) {
/* ベーシックレイアウトをシンプルにします。 */
#main #content {
margin: 0 7.6%;
width: auto;
}
#nav-below {
border-bottom: 1px solid #ddd;
margin-bottom: 1.625em;
}
#main #secondary {
float: none;
margin: 0 7.6%;
width: auto;
}
/* ショーケーステンプレートをシンプルにします。 */
.page-template-showcase-php .featured-posts {
min-height: 280px;
}
.featured-posts section.featured-post {
height: auto;
}
.page-template-showcase-php section.recent-posts {
float: none;
margin: 0;
width: 100%;
}
.page-template-showcase-php #main .widget-area {
float: none;
margin: 0;
width: auto;
}
.page-template-showcase-php .other-recent-posts {
border-bottom: 1px solid #ddd;
}
/* 注目記事が小さいときにショーケーステンプレートをシンプルにします。 */
section.featured-post .attachment-small-feature,
.one-column section.featured-post .attachment-small-feature {
border: none;
display: block;
float: left;
height: auto;
margin: 0.625em auto 1.025em;
max-width: 30%;
position: static;
}
article.feature-image.small {
float: right;
margin: 0 0 1.625em;
width: 64%;
}
.one-column article.feature-image.small .entry-summary {
height: auto;
}
article.feature-image.small .entry-summary p a {
left: 0;
padding-left: 20px;
padding-right: 20px;
width: auto;
}
/* シングル記事の余白を削除します。 */
.singular .entry-header,
.singular .entry-content,
.singular footer.entry-meta,
.singular #comments-title {
width: 100%;
}
/* リード文のそのスタイルをシンプルにします。 */
.singular blockquote.pull {
margin: 0 0 1.625em;
}
.singular .pull.alignleft {
margin: 0 1.625em 0 0;
}
.singular .pull.alignright {
margin: 0 0 0 1.625em;
}
.singular .entry-meta .edit-link a {
left: 0;
position: absolute;
top: 40px;
}
.singular #author-info {
margin: 2.2em -8.8% 0;
padding: 20px 8.8%;
}
/* コメントアバター用に余裕を設けます。 */
.commentlist {
width: 100%;
}
.commentlist > li.comment,
.commentlist .pingback {
margin-left: 102px;
width: auto;
}
/* full-width のコメントフォーム */
#respond {
width: auto;
}
/* このサイズでフッターウィジェットをフロートする必要はないため */
#colophon #supplementary .widget-area {
float: none;
margin-right: 0;
width: auto;
}
/* このサイズで 404 ウィジェットをフロートする必要はないため */
.error404 #main .widget {
float: none;
margin-right: 0;
width: auto;
}
/* embed がコンテナにフィットするようにします。 */
embed,
object {
max-width: 100%;
}<br /><br />}
@media (max-width: 650px) {
/* @media (max-width: 650px) では、小さなデバイスで読み易くなるようフォントサイズを減らします。 */
body, input, textarea {
font-size: 13px;
}
#site-title a {
font-size: 24px;
}
#site-description {
font-size: 12px;
}
#access ul {
font-size: 12px;
}
article.intro .entry-content {
font-size: 12px;
}
.entry-title {
font-size: 21px;
}
.featured-post .entry-title {
font-size: 14px;
}
.singular .entry-title {
font-size: 28px;
}
.entry-meta {
font-size: 12px;
}
blockquote {
margin: 0;
}
blockquote.pull {
font-size: 17px;
}
/* サイトのタイトルと説明を少しだけ再配置します。 */
#site-title {
padding: 5.30625em 0 0;
}
#site-title,
#site-description {
margin-right: 0;
}
/* ロゴと検索フォームがぶつからないようにします。 */
#branding #searchform {
top: 1.625em !important;
}
/* このサイズではフロートされたコンテンツがうまく機能しないため */
.alignleft,
.alignright {
float: none;
margin-left: 0;
margin-right: 0;
}
/* 投稿ナビゲーションと何かがぶつからないようにします。 */
#nav-single {
display: block;
position: static;
}
.singular .hentry {
padding: 1.625em 0 0;
}
.singular.page .hentry {
padding: 1.625em 0 0;
}
/* このサイズではアバターが過剰にスペースを取ってしまうため */
.commentlist > li.comment,
.commentlist > li.pingback {
margin-left: 0 !important;
}
.commentlist .avatar {
background: transparent;
display: block;
padding: 0;
position: static;
}
.commentlist .children .avatar {
background: none;
left: 2.2em;
padding: 0;
position: absolute;
top: 2.2em;
}
/* 小さなコメントフォームで利用できるスペースを使用します。 */
#respond input[type="text"] {
width: 95%;
}
#respond .comment-form-author .required,
#respond .comment-form-email .required {
left: 95%;
}
#content .gallery-columns-3 .gallery-item {
width: 31%;
padding-right: 2%;
}
#content .gallery-columns-3 .gallery-item img {
width: 100%;
height: auto;
}<br /><br />}
@media (max-width: 450px) {
#content .gallery-columns-2 .gallery-item {
width: 45%;
padding-right: 4%;
}
#content .gallery-columns-2 .gallery-item img {
width: 100%;
height: auto;
}<br /><br />}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
body {
padding: 0;
}
#page {
margin-top: 0;
}
#branding {
border-top: none;
}<br /><br />}<br /><br />/* =印刷
———————————————– */<br /><br />@media print {
body {
background: none !important;
font-size: 10pt;
}
footer.entry-meta a[rel=bookmark]:link:after,
footer.entry-meta a[rel=bookmark]:visited:after {
content: " [" attr(href) "] "; /* URL を表示します */
}
#page {
clear: both !important;
display: block !important;
float: none !important;
max-width: 100%;
position: relative !important;
}
#branding {
border-top: none !important;
padding: 0;
}
#branding hgroup {
margin: 0;
}
#site-title a {
font-size: 21pt;
}
#site-description {
font-size: 10pt;
}
#branding #searchform {
display: none;
}
#branding img {
display: none;
}
#access {
display: none;
}
#main {
border-top: none;
box-shadow: none;
}
#primary {
float: left;
margin: 0;
width: 100%;
}
#content {
margin: 0;
width: auto;
}
.singular #content {
margin: 0;
width: 100%;
}
.singular .entry-header .entry-meta {
position: static;
}
.entry-meta .edit-link a {
display: none;
}
#content nav {
display: none;
}
.singular .entry-header,
.singular .entry-content,
.singular footer.entry-meta,
.singular #comments-title {
margin: 0;
width: 100%;
}
.singular .hentry {
padding: 0;
}
.entry-title,
.singular .entry-title {
font-size: 21pt;
}
.entry-meta {
font-size: 10pt;
}
.entry-header .comments-link {
display: none;
}
.page-link {
display: none;
}
.singular #author-info {
background: none;
border-bottom: none;
border-top: none;
margin: 2.2em 0 0;
padding: 0;
}
#respond {
display: none;
}
.widget-area {
display: none;
}
#colophon {
display: none;
}<br /><br /> /* コメント */
.commentlist > li.comment {
background: none;
border: 1px solid #ddd;
-moz-border-radius: 3px 3px 3px 3px;
border-radius: 3px 3px 3px 3px;
margin: 0 auto 1.625em;
padding: 1.625em;
position: relative;
width: auto;
}
.commentlist .avatar {
height: 39px;
left: 2.2em;
top: 2.2em;
width: 39px;
}
.commentlist li.comment .comment-meta {
line-height: 1.625em;
margin-left: 50px;
}
.commentlist li.comment .fn {
display: block;
}
.commentlist li.comment .comment-content {
margin: 1.625em 0 0;
}
.commentlist .comment-edit-link {
display: none;
}
.commentlist > li::before,
.commentlist > li.bypostauthor::before {
content: ”;
}
.commentlist .reply {
display: none;
}<br /><br /> /* 投稿の作成者をハイライトします。 */
.commentlist > li.bypostauthor {
color: #444;
}
.commentlist > li.bypostauthor .comment-meta {
color: #666;
}
.commentlist > li.bypostauthor:before {
content: none;
}<br /><br /> /* 投稿の作成者をスレッド表示します。 */
.commentlist .children > li.bypostauthor {
background: #fff;
border-color: #ddd;
}
.commentlist .children > li.bypostauthor > article,
.commentlist .children > li.bypostauthor > article .comment-meta {
color: #666;
}<br /><br />}<br /><br />/* =IE7
———————————————– */<br /><br />#ie7 article.intro {
margin-left: -7.6%;
margin-right: -7.6%;
padding-left: -7.6%;
padding-right: -7.6%;
max-width: 1000px;
}
#ie7 section.featured-post {
margin-left: -7.6%;
margin-right: -7.6%;
max-width: 850px;
}
#ie7 section.recent-posts {
margin-right: 7.6%;
}
[/css]

license.txt

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

,

“Twenty Eleven テーマ内の説明を日本語訳しました” への11件のフィードバック

  1. 有難うございます。
    ソース内で
    と、brが出てきているのですがここは改行×2という解釈でよろしいでしょうか?

  2. I installed qtranslate. When I write comment under English and press submit, why the page switches to default Japanese ( I set Japanese as default language). I would like the page stays under English, not Japanese. Who can help me to resolve this problem. Thank you.

  3. ありがとうございます。大変 役に立っています。大変な作業だったと思いますが、私のような半端に英語が読めない者でも、カスタマイズの恩恵にあずかれます。感謝、感謝です。

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

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

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