<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>8bitodyssey.com &#187; 3.0</title>
	<atom:link href="http://8bitodyssey.com/archives/tag/3-0/feed" rel="self" type="application/rss+xml" />
	<link>http://8bitodyssey.com</link>
	<description>WordPressでつづる、おでのこの道わが旅。</description>
	<lastBuildDate>Sat, 04 Feb 2012 02:26:13 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://8bitodyssey.com/archives/tag/3-0/feed" />
		<item>
		<title>特定のページにカスタム投稿タイプを表示する[WordPress 3.0]</title>
		<link>http://8bitodyssey.com/archives/1727</link>
		<comments>http://8bitodyssey.com/archives/1727#comments</comments>
		<pubDate>Sat, 25 Sep 2010 14:13:00 +0000</pubDate>
		<dc:creator>おで</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[ウェブ開発]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[カスタム投稿タイプ]]></category>

		<guid isPermaLink="false">http://8bitodyssey.com/?p=1727</guid>
		<description><![CDATA[<p><img src="http://www.odysseygate.com/images/pero.jpg" style="float: left; margin: 2px 5px 1px 0px"/></p>
<p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4149/5025358610_2ef85292ea_b.jpg"><img id="thumb4b4a65daeea404443dc1267b1d30a854" title="Click to enlarge" alt="カスタム投稿タイプ" src="http://farm5.static.flickr.com/4149/5025358610_2ef85292ea.jpg" width="500" height="293" /></a></p>  <div id="caption-for-thumb4b4a65daeea404443dc1267b1d30a854" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/5025358610/" target="_blank">カスタム投稿タイプ</a></div>  <p></p>  <p></p>  <p><a href="http://8bitodyssey.com/archives/1624">カスタム投稿タイプ(Custom Post Type)の導入と使い方 [WordPress 3.0]</a> では、index.php にカスタム投稿タイプを表示してみました。では、特定のページにカスタム投稿タイプを表示するにはどうしたらよいのでしょうか？※誤解のないように、本記事での「ページ」は WordPress の投稿ではない「ページ（Pages）」を指しています。</p>  <p>ちょうど質問もあったので試してみました。</p> <span id="more-1727"></span>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4106/5025347650_48b6d6f1ae_b.jpg"><img id="thumbb4f66dea10469728b0f941610416a5e1" title="Click to enlarge" alt="何もしていないページ" src="http://farm5.static.flickr.com/4106/5025347650_48b6d6f1ae.jpg" width="500" height="293" /></a></p>  <div id="caption-for-thumbb4f66dea10469728b0f941610416a5e1" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/5025347650/" target="_blank">何もしていないページ</a></div>  <p></p>  <p>特定のページ”だけ”に表示する、というのが今回の目的なので、とりあえず、プロフィールのページに”のみ”表示してみることにします。上のスクリーンショットが何もしていない状態のプロフィールページです。</p>  <h3>ページテンプレートの仕組みを理解する</h3>  <p>ページの仕様では、ページのテンプレートは以下の順番で決まるようになっています（参考：<a href="http://wpdocs.sourceforge.jp/Pages#WordPress.E3.83.9A.E3.83.BC.E3.82.B8.E3.82.92.E8.A1.A8.E7.A4.BA.E3.81.99.E3.82.8B.E9.9A.9B.E3.80.81.E3.81.A9.E3.81.AE.E3.83.86.E3.83.B3.E3.83.97.E3.83.AC.E3.83.BC.E3.83.88.E3.81.8C.E4.BD.BF.E3.82.8F.E3.82.8C.E3.81.BE.E3.81.99.E3.81.8B.EF.BC.9F">ページテンプレート - Pages - WordPress Codex 日本語版</a>）。</p>  <blockquote>   <ol>     <li>選択したカスタム<b>WordPressページ</b>テンプレート </li>      <li>page.php </li>      <li>index.php </li>   </ol> </blockquote>  <p>使用しているテーマにもよりますが、通常は 1 がなく、2 が使われている場合が多いでしょう。</p>  <p>例としてあげたスクリーンショットで使っているテーマ「Twenty Ten」においても、page.php が用意されており、プロフィールページもまた『デフォルトテンプレート』を使用していました。</p>  <p>特定のページにカスタム投稿タイプを表示するためには、<strong>カスタム投稿タイプを表示するカスタム WordPress ページテンプレートを作成し、特定のページに対して、そのカスタム WordPress ページテンプレートを適用してあげればよさそう</strong>です。</p>  <h3>カスタム投稿タイプを表示するページテンプレートを作成する</h3>  <p>では、カスタム投稿タイプを表示できるカスタム WordPress ページテンプレートを作成してみます。</p>  <p>カスタム WordPress ページテンプレートのルールとしては</p>  
[php]&lt;?php
/*
Template Name: マイページ
*/
?&gt;[/php]

<p>というテンプレート名の宣言があれば、あとはどのように書いてもよいのですが、ここでは説明を簡単にするために、Twenty Ten テーマに用意されていたカスタムページテンプレート「onecolumn-page.php」を書き換えてみます。</p>

<p>このファイルをコピーして、custom-onecolumn-page.php という名前にして、テーマディレクトリに置きます。</p>

<p>テンプレート名を</p>

[php]&lt;?php
/**
 * Template Name: Custom One column, no sidebar to display custom post type.
 *
[/php] 

<p>のように書き換えて、</p>

[php]	&lt;div id=&quot;container&quot; class=&quot;one-column&quot;&gt;
&lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;
[/php] 

<p>の下に、index.php の際にも書いた、</p>

[php]&lt;?php $loop = new WP_Query( array( 'post_type' =&gt; 'headline', 'posts_per_page' =&gt; 5 ) ); ?&gt;

&lt;?php while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;

		&lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;
			&lt;h2 class=&quot;entry-title&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; title=&quot;&lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&gt;&quot; rel=&quot;bookmark&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;

			&lt;div class=&quot;entry-meta&quot;&gt;
				&lt;?php twentyten_posted_on(); ?&gt;
			&lt;/div&gt;&lt;!-- .entry-meta --&gt;

			&lt;div class=&quot;entry-content&quot;&gt;
			&lt;?php the_content(); ?&gt;
			&lt;/div&gt;
		&lt;/div&gt;
&lt;?php endwhile; ?&gt;
[/php] 

<p>を挿入します。</p>

<p>※このコードを page.php に挿入すれば、すべてのページにカスタム投稿タイプが表示されます。</p>

<h3>カスタムページテンプレートを特定のページに適用する</h3>

<p>最後に特定のページ、であるところの「プロフィールページ」にさきほど作成した「Custom One column, no sidebar」テンプレートを適用します。</p>

<p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4132/5025347688_c18b6ecb1c_b.jpg"><img id="thumb4d9adea71f76820136634095e60d2094" title="Click to enlarge" alt="カスタム投稿タイプを表示するようにしたテンプレートに変更" src="http://farm5.static.flickr.com/4132/5025347688_c18b6ecb1c.jpg" width="500" height="293" /></a></p>

<div id="caption-for-thumb4d9adea71f76820136634095e60d2094" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/5025347688/" target="_blank">カスタム投稿タイプを表示するようにしたテンプレートに変更</a></div>

<p>ページ属性のところにあるテンプレートを「デフォルトテンプレート」から「Custom One column, no sidebar」へと変更するだけです。</p>

<p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4131/5024734333_66dc0d1a3a_b.jpg"><img id="thumb22ef5e3c88ef804079f58349e12d1cb6" title="Click to enlarge" alt="特定のページにカスタム投稿タイプを表示できる" src="http://farm5.static.flickr.com/4131/5024734333_66dc0d1a3a.jpg" width="500" height="293" /></a></p>

<div id="caption-for-thumb22ef5e3c88ef804079f58349e12d1cb6" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/5024734333/" target="_blank">特定のページにカスタム投稿タイプを表示できる</a></div>

<p>プロフィールの上にカスタム投稿タイプが表示されました。「Custom One column, no sidebar」を適用しているページはプロフィールページだけなので、このページのみにカスタム投稿タイプが表示されます。</p>

<p>意外と簡単でしたね。</p><p>&copy; 2012 <a href="http://www.odysseygate.com/" title="Odysseygate.com">Odysseygate.com</a> This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact odysseygate@gmail.com so we can take legal action immediately.</p><p>鼻からカフェモカ。</p>]]></description>
		<wfw:commentRss>http://8bitodyssey.com/archives/1727/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://8bitodyssey.com/archives/1727" />
	</item>
		<item>
		<title>Twenty Ten 1.1 の変更点とアップデートの注意点</title>
		<link>http://8bitodyssey.com/archives/1656</link>
		<comments>http://8bitodyssey.com/archives/1656#comments</comments>
		<pubDate>Sat, 24 Jul 2010 16:36:09 +0000</pubDate>
		<dc:creator>おで</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[twenty ten]]></category>
		<category><![CDATA[wp3]]></category>
		<category><![CDATA[日本語]]></category>

		<guid isPermaLink="false">http://8bitodyssey.com/?p=1656</guid>
		<description><![CDATA[<p><img src="http://www.odysseygate.com/images/pero.jpg" style="float: left; margin: 2px 5px 1px 0px"/></p>
<p><img style="display: inline" title="Twenty Ten 1.1" alt="Twenty Ten 1.1" src="http://8bitodyssey.com/wp-content/uploads/2010/07/20100724.png" width="500" height="334" /> </p>  <p><a href="http://wordpress.org/extend/themes/twentyten" target="_blank">Twenty Ten がバージョンアップして、1.1 に</a>なりました。 どこが変わったんだろう、と思っている方も多いかと思いますので、ソースを拾って変更点をまとめてみました。また、アップデートの際の注意点も合わせて書いてみたいと思います。</p> <span id="more-1656"></span>  <h3>Twenty Ten 1.1 アップデートの注意点</h3>  <p>変更点は長いので、まずはこちらから（笑）WordPress 3.0 日本語版を使っている場合、「ダッシュボード」の「アップデート」や、「テーマの管理」から Twenty Ten をアップデートすると、Twenty Ten テーマに関係するテキスト（メッセージ）の多くが英語になってしまいます。</p>  <p>これは、アップデートの際に、/wp-content/themes/twentyten/ 内のファイルはすべて削除されてしまうため、/wp-content/themes/twentyten/languages 内にある ja.mo ファイルもまた削除されてしまうためです。（これはテーマに限ったことではなく、プラグインでも同様です。プラグインでもともと用意されたものではない、画像などファイルをアップロードして利用するときは、プラグインディレクトリとは別のディレクトリに入れておくほうが良いでしょう。）</p>  <p>Twenty Ten 1.1 では、上の画像にも載っている、「テーマの管理」のところに表示されるテーマの説明文以外のメッセージは変更されていませんので、WordPress 3.0 日本語版にも入っている Twenty Ten 1.0 の ja.mo ファイルを /wp-content/themes/twentyten/languages にアップロードすれば問題ないと思います。</p>  <p><a href="http://svn.automattic.com/wordpress-i18n/ja/tags/3.0/messages/twentyten/ja.mo" target="_blank">Twenty Ten 1.0 の ja.mo ファイルはこちらからダウンロードすることもできます</a>。</p>

<h3>Twenty Ten 1.1 の変更点</h3>

<p>まとめ：wp_title の処理を functions.php から header.php に移植しています。残りはコードの整形が大半で、style.css の変更も含めて、大きく機能や表示に影響を及ぼす変更は見受けられません。</p>

  <p><strong>twentyten</strong><br />
├<a href="#tt_images">/images</a><br />
├<a href="#tt_languages">/languages/twentyten.pot </a><br />
├<a href="#tt_404">404.php</a><br />
├<a href="#tt_archive">archive.php</a><br />
├<a href="#tt_attachment">attachment.php</a><br />
├<a href="#tt_author">author.php</a><br />
├<a href="#tt_category">category.php</a><br />
├<a href="#tt_comments">comments.php</a><br />
├<a href="#tt_editor-style">editor-style.css</a><br />
├<a href="#tt_editor-style-rtl">editor-style-rtl.css</a><br />
├<a href="#tt_footer">footer.php</a><br />
├<a href="#tt_functions">functions.php</a><br />
├<a href="#tt_header">header.php</a><br />
├<a href="#tt_index">index.php</a><br />
├<a href="#tt_license">license.txt</a><br />
├<a href="#tt_loop">loop.php</a><br />
├<a href="#tt_onecolumn-page">onecolumn-page.php</a><br />
├<a href="#tt_page">page.php</a><br />
├<a href="#tt_rtl">rtl.css</a><br />
├<a href="#tt_search">search.php</a><br />
├<a href="#tt_sidebar">sidebar.php</a><br />
├<a href="#tt_sidebar-footer">sidebar-footer.php</a><br />
├<a href="#tt_single">single.php</a><br />
├<a href="#tt_style">style.css</a><br />
└<a href="#tt_tag">tag.php</a>
</p>  

<h3><a id="tt_images">/images</a></h3>

<p>変更なし</p>

<h3><a id="tt_languages">/languages/twentyten.pot </a></h3>

<p>テーマの管理で使われるテーマの説明文を以下の通り変更</p>

[text firstline="421"]The 2010 default theme for WordPress.[/text]

<p style="text-align: center;">↓</p>

[text firstline="416"]The 2010 theme for WordPress is stylish, customizable, simple, and readable — make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the “Asides” and “Gallery” categories, and has an optional one-column page template that removes the sidebar.
（訳：WordPress のテーマ「2010」は、スタイリッシュで、カスタマイズ可能で、簡潔で、読みやすく -- カスタムメニュー、ヘッダー画像、背景でサイトを作れます。Twenty Ten は6つのウィジェットエリア (サイドバーに2つ、フッターに4つ) と、アイキャッチ画像 (ギャラリー投稿のサムネイルと、投稿やページのカスタムヘッダー画像) に対応しています。印刷用、管理のビジュアルエディター用、&quot;Asides&quot; と &quot;Gallery&quot; カテゴリー用のスタイルシートが用意されています。また、サイドバーを取り去った1カラムのページのテンプレートもあります。 ）
[/text]


<h3><a id="tt_404">404.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_archive">archive.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_attachment">attachment.php</a></h3>

<p>class 指定の追加</p>

[html firstline="12"]&lt;div id=&quot;container&quot;&gt;[/html]

<p>↓</p>

[html firstline="12"]&lt;div id=&quot;container&quot; class=&quot;single-attachment&quot;&gt;[/html]

<p>親ページの ID が空でない場合に実行するよう、変更</p>

[php firstline="17"]
                   &lt;p class=&quot;page-title&quot;&gt;&lt;a href=&quot;&lt;?php echo get_permalink( $post-&gt;post_parent ); ?&gt;&quot; title=&quot;&lt;?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post-&gt;post_parent ) ) ); ?&gt;&quot; rel=&quot;gallery&quot;&gt;&lt;?php
                         /* translators: %s - title of parent post */
                         printf( __( '&lt;span class=&quot;meta-nav&quot;&gt;&amp;larr;&lt;/span&gt; %s', 'twentyten' ), get_the_title( $post-&gt;post_parent ) );
                    ?&gt;&lt;/a&gt;&lt;/p&gt; 
[/php]

<p style="text-align: center;">↓</p>

[php firstline="17"]
                   &lt;?php if ( ! empty( $post-&gt;post_parent ) ) : ?&gt;
                         &lt;p class=&quot;page-title&quot;&gt;&lt;a href=&quot;&lt;?php echo get_permalink( $post-&gt;post_parent ); ?&gt;&quot; title=&quot;&lt;?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post-&gt;post_parent ) ) ); ?&gt;&quot; rel=&quot;gallery&quot;&gt;&lt;?php
                              /* translators: %s - title of parent post */
                              printf( __( '&lt;span class=&quot;meta-nav&quot;&gt;&amp;larr;&lt;/span&gt; %s', 'twentyten' ), get_the_title( $post-&gt;post_parent ) );
                         ?&gt;&lt;/a&gt;&lt;/p&gt;
                    &lt;?php endif; ?&gt;
[/php]

<h3><a id="tt_author">author.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_category">category.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_comments">comments.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_editor-style">editor-style.css</a></h3>

<p>プロパティの色指定が大文字から小文字に変更</p>

[css firstline="42"]background-color: #E7E7E7;[/css]
<p>↓</p>
[css firstline="42"]background-color: #e7e7e7;[/css]

[css firstline="98"]background: #FFFFCC;[/css]
<p>↓</p>
[css firstline="98"]background: #ffffcc;[/css]

[css firstline="145"]color:#0066CC;[/css]
<p>↓</p>
[css firstline="145"]color:#0066cc;[/css]

[css firstline="152"]color: #FF4B33;[/css]
<p>↓</p>
[css firstline="152"]color: #ff4b33;[/css]


<h3><a id="tt_editor-style-rtl">editor-style-rtl.css</a></h3>

<p>変更なし</p>

<h3><a id="tt_footer">footer.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_functions">functions.php</a></h3>

<p>記事やページに合わせて wp_title を出し分けする処理をごっそり削除し、header.php に移植</p>

[php firstline="207"]
 * Makes some changes to the &lt;title&gt; tag, by filtering the output of wp_title().
*
* If we have a site description and we're viewing the home page or a blog posts
* page (when using a static front page), then we will add the site description.
*
* If we're viewing a search result, then we're going to recreate the title entirely.
* We're going to add page numbers to all titles as well, to the middle of a search
* result title and the end of all other titles.
*
* The site title also gets added to all titles.
*
* @since Twenty Ten 1.0
*
* @param string $title Title generated by wp_title()
* @param string $separator The separator passed to wp_title(). Twenty Ten uses a
*      vertical bar, &quot;|&quot;, as a separator in header.php.
* @return string The new title, ready for the &lt;title&gt; tag.
*/
function twentyten_filter_wp_title( $title, $separator ) {
     // Don't affect wp_title() calls in feeds.
     if ( is_feed() )
          return $title;

     // The $paged global variable contains the page number of a listing of posts.
     // The $page global variable contains the page number of a single post that is paged.
     // We'll display whichever one applies, if we're not looking at the first page.
     global $paged, $page;

     if ( is_search() ) {
          // If we're a search, let's start over:
          $title = sprintf( __( 'Search results for %s', 'twentyten' ), '&quot;' . get_search_query() . '&quot;' );
          // Add a page number if we're on page 2 or more:
          if ( $paged &gt;= 2 )
               $title .= &quot; $separator &quot; . sprintf( __( 'Page %s', 'twentyten' ), $paged );
          // Add the site name to the end:
          $title .= &quot; $separator &quot; . get_bloginfo( 'name', 'display' );
          // We're done. Let's send the new title back to wp_title():
          return $title;
     }

     // Otherwise, let's start by adding the site name to the end:
     $title .= get_bloginfo( 'name', 'display' );

     // If we have a site description and we're on the home/front page, add the description:
     $site_description = get_bloginfo( 'description', 'display' );
     if ( $site_description &amp;&amp; ( is_home() || is_front_page() ) )
          $title .= &quot; $separator &quot; . $site_description;

     // Add a page number if necessary:
     if ( $paged &gt;= 2 || $page &gt;= 2 )
          $title .= &quot; $separator &quot; . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );

     // Return the new title to wp_title():
     return $title;
}
add_filter( 'wp_title', 'twentyten_filter_wp_title', 10, 2 );

/** 
[/php]

<p style="text-align: center;">↓</p>

[php firstline="207"]// 削除[/php]

<h3><a id="tt_header">header.php</a></h3>

<p>functions.php より wp_title 処理を移植</p>

[php firstline="18"]
      * We filter the output of wp_title() a bit -- see （wp_title() の出力をフィルターします。詳しくは
      * twentyten_filter_wp_title() in functions.php. （functions.php の twentyten_filter_wp_title() を参照してください。
      */
     wp_title( '|', true, 'right' ); 
[/php]

<p style="text-align: center;">↓</p>

[php firstline="18"]
      */
     global $page, $paged;

     wp_title( '|', true, 'right' );

     // Add the blog name. （ブログ名を追加します）
     bloginfo( 'name' );

     // Add the blog description for the home/front page. （ホーム/フロントページにブログの説明を追加します）
     $site_description = get_bloginfo( 'description', 'display' );
     if ( $site_description &amp;&amp; ( is_home() || is_front_page() ) )
          echo &quot; | $site_description&quot;;

     // Add a page number if necessary: （必要であればページナンバーを追加します）
     if ( $paged &gt;= 2 || $page &gt;= 2 )
          echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) ); 
[/php]

<h3><a id="tt_index">index.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_license">license.txt</a></h3>

<p>変更なし</p>

<h3><a id="tt_loop">loop.php</a></h3>

<p>HTML 部分 と PHP 部分のコードを整理してまとめた模様</p>

[php firstline="71"]
&lt;?php else : ?&gt;
                    &lt;div class=&quot;gallery-thumb&quot;&gt;
&lt;?php
     $images = get_children( array( 'post_parent' =&gt; $post-&gt;ID, 'post_type' =&gt; 'attachment', 'post_mime_type' =&gt; 'image', 'orderby' =&gt; 'menu_order', 'order' =&gt; 'ASC', 'numberposts' =&gt; 999 ) );
     $total_images = count( $images );
     $image = array_shift( $images );
     $image_img_tag = wp_get_attachment_image( $image-&gt;ID, 'thumbnail' );
?&gt;
                         &lt;a class=&quot;size-thumbnail&quot; href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php echo $image_img_tag; ?&gt;&lt;/a&gt;
                    &lt;/div&gt;&lt;!-- .gallery-thumb --&gt;
                    &lt;p&gt;&lt;em&gt;&lt;?php printf( __( 'This gallery contains &lt;a %1$s&gt;%2$s photos&lt;/a&gt;.', 'twentyten' ),
                              'href=&quot;' . get_permalink() . '&quot; title=&quot;' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '&quot; rel=&quot;bookmark&quot;',
                              $total_images
                         ); ?&gt;&lt;/em&gt;&lt;/p&gt;

                    &lt;?php the_excerpt(); ?&gt; 
[/php]

<p style="text-align: center;">↓</p>

[php firstline="71"]
&lt;?php else : ?&gt;               
                    &lt;?php
                         $images = get_children( array( 'post_parent' =&gt; $post-&gt;ID, 'post_type' =&gt; 'attachment', 'post_mime_type' =&gt; 'image', 'orderby' =&gt; 'menu_order', 'order' =&gt; 'ASC', 'numberposts' =&gt; 999 ) );
                         if ( $images ) :
                              $total_images = count( $images );
                              $image = array_shift( $images );
                              $image_img_tag = wp_get_attachment_image( $image-&gt;ID, 'thumbnail' );
                    ?&gt;
                              &lt;div class=&quot;gallery-thumb&quot;&gt;
                                   &lt;a class=&quot;size-thumbnail&quot; href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php echo $image_img_tag; ?&gt;&lt;/a&gt;
                              &lt;/div&gt;&lt;!-- .gallery-thumb --&gt;
                              &lt;p&gt;&lt;em&gt;&lt;?php printf( __( 'This gallery contains &lt;a %1$s&gt;%2$s photos&lt;/a&gt;.', 'twentyten' ),
                                        'href=&quot;' . get_permalink() . '&quot; title=&quot;' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '&quot; rel=&quot;bookmark&quot;',
                                        $total_images
                                   ); ?&gt;&lt;/em&gt;&lt;/p&gt;
                    &lt;?php endif; ?&gt;
                              &lt;?php the_excerpt(); ?&gt;
[/php]

<h3><a id="tt_onecolumn-page">onecolumn-page.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_page">page.php</a></h3>

<p>どこが変わったのか、コアコミッター達のこだわりを感じてください（笑</p>

[php firstline="6"]
* Please note that this is the wordpress construct of pages
* and that other 'pages' on your wordpress site will use a 
[/php]

<p style="text-align: center;">↓</p>

[php firstline="6"]
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a 
[/php]

<p>?&gt;の背後に大量のスペースがあったものを削除</p>

[php firstline="25"]
                         &lt;?php } else { ?&gt;     
                              &lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;
                         &lt;?php } ?&gt;                     
[/php]

<p style="text-align: center;">↓</p>

[php firstline="25"]
                         &lt;?php } else { ?&gt;
                              &lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;
                         &lt;?php } ?&gt;
[/php]

<h3><a id="tt_rtl">rtl.css</a></h3>

<p>変更なし</p>

<h3><a id="tt_search">search.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_sidebar">sidebar.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_sidebar-footer">sidebar-footer.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_single">single.php</a></h3>

<p>変更なし</p>

<h3><a id="tt_style">style.css</a></h3>

<p>@charset の削除</p>

[css firstline="1"]@charset &quot;utf-8&quot;;[/css]

<p>↓</p>

[css firstline="1"]/* 削除 */[/css]



<p>width: 928px の指定を追加</p>

[css firstline="383"]
div.menu {
     font-size: 13px;
     margin-left: 12px;
} 
[/css]

<p>↓</p>

[css firstline="377"]
div.menu {
     font-size: 13px;
     margin-left: 12px;
     width: 928px;
} 
[/css]

<p>clear: both; の指定を追加</p>

[css firstline="456"]
#main { 
     overflow: hidden; 
     padding: 40px 0 0 0; 
} 
[/css]

<p>↓</p>

[css firstline="451"]
#main { 
     clear: both; 
     overflow: hidden; 
     padding: 40px 0 0 0; 
} 
[/css]

<p>class 指定の変更</p>

[css firstline="663"]
.page .edit-link { 
     clear: both; 
     display: block; 
} 
[/css]

<p>↓</p>

[css firstline="659"]
body.page .edit-link { 
     clear: both; 
     display: block; 
} 
[/css]


<p>指定の丸ごと削除</p>

[css firstline="737"]
.category-gallery { 
     margin-bottom: 48px; 
} 
.category-gallery h2 { 
     margin-top: 10px; 
} 
.category-gallery .entry-meta { 
} 

[/css]

<p>↓</p>

[css firstline="729"]
/* 削除 */
[/css]

[css firstline="754"]
.home #content .category-gallery .entry-content p { 
     display: inline; 
} 
[/css]

<p>↓</p>

[css firstline="739"]
/* 削除 */
[/css]

[css firstline="765"]
.entry-content .attachment img { 
     margin-bottom: 0; 
}
[/css]

<p>↓</p>

[css firstline="746"]
/* 削除 */
[/css]


<p>width、height の指定追加</p>

[css firstline="784"]
#content img { 
     margin: 0; 
     max-width: 640px; 
} 
[/css]

<p>↓</p>

[css firstline="762"]
#content img { 
     margin: 0; 
     height: auto; 
     max-width: 640px; 
     width: auto; 
} 
[/css]

<p>margin 指定の変更</p>

[css firstline="835"]
#content .gallery { 
     margin: auto; 
} 
[/css]

<p>↓</p>

[css firstline="815"]
#content .gallery { 
     margin: 0 auto 18px; 
} 
[/css]

<p>プロパティ指定の追加（添付画像がセンタリングされるように）</p>

[css firstline="861"]
 
[/css]

<p>↓</p>

[css firstline="841"]
#content .attachment img { /* single attachment images should be centered */ 
     display: block; 
     margin: 0 auto; 
} 
[/css]

<p>上記以外の指定についても大量に変更されていますが、レイアウトやスタイルに影響するものはありません。以下のいずれかに該当するようになっていますので、例には初出の行を例として表示しておきます。</p>

<p>=の追加</p>

[css firstline="12"]/* Reset default browser CSS. Based on work by Eric Meyer: http://meyerweb.com/eric/tools/css/reset/index.html  [/css]

<p>↓</p>

[css firstline="11"]/* =Reset default browser CSS. Based on work by Eric Meyer: http://meyerweb.com/eric/tools/css/reset/index.html  [/css]


<p>プロパティの指定をアルファベット順に変更</p>

[css firstline="24"]
     margin: 0;
     padding: 0;
     border: 0;
     vertical-align: baseline;
     background: transparent;
[/css]

<p>↓</p>

[css firstline="23"]
     background: transparent;
     border: 0;
     margin: 0;
     padding: 0;
     vertical-align: baseline; 
[/css]


<p>プロパティの指定をフォーマット（改行）</p>

[css firstline="55"]
a img { border: none; }
[/css]

<p>↓</p>

[css firstline="54"]
a img {
     border: none;
}
[/css]

<p>見出しの追加</p>

[css firstline="55"]
 
[/css]

<p>↓</p>

[css firstline="58"]
/* =Layout
-------------------------------------------------------------- */ 
[/css]


<p>スペースを削除</p>

[css firstline="202"]
/* Main global 'theme' and typographic styles  */  
[/css]

<p>↓</p>

[css firstline="200"]
/* Main global 'theme' and typographic styles */
[/css]






<p>プロパティをフォーマット（:の後にスペースを挿入）</p>

[css firstline="235"]
     list-style:upper-alpha;
[/css]

<p>↓</p>

[css firstline="232"]
     list-style: upper-alpha;
[/css]


<p>プロパティの色指定が大文字から小文字に変更</p>

[css firstline="318"]
     color:#0066CC;
[/css]

<p>↓</p>

[css firstline="314"]
     color: #0066cc;
[/css]

<p>プロパティの指定をアルファベット順に変更。但しサイズだけは width→height の順</p>

[css firstline="423"]
#access ul ul a { 
     background:#333; 
     height:auto; 
     line-height:1em; 
     padding:10px; 
     width: 160px; 
} 
#access li:hover &gt; a, 
#access ul ul :hover &gt; a { 
     color:#fff; 
     background:#333; 
} 
[/css]

<p>↓</p>

[css firstline="418"]
#access ul ul a { 
     background: #333; 
     line-height: 1em; 
     padding: 10px; 
     width: 160px; 
     height: auto; 
} 
#access li:hover &gt; a, 
#access ul ul :hover &gt; a { 
     background: #333; 
     color: #fff; 
} 
[/css]

<h3><a id="tt_tag">tag.php</a></h3>

<p>変更なし</p><p>&copy; 2012 <a href="http://www.odysseygate.com/" title="Odysseygate.com">Odysseygate.com</a> This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact odysseygate@gmail.com so we can take legal action immediately.</p><p>鼻からカフェモカ。</p>]]></description>
		<wfw:commentRss>http://8bitodyssey.com/archives/1656/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://8bitodyssey.com/archives/1656" />
	</item>
		<item>
		<title>Twenty Ten テーマのコード内の説明を日本語化しました</title>
		<link>http://8bitodyssey.com/archives/1651</link>
		<comments>http://8bitodyssey.com/archives/1651#comments</comments>
		<pubDate>Sat, 17 Jul 2010 05:00:00 +0000</pubDate>
		<dc:creator>おで</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[saitama]]></category>
		<category><![CDATA[twenty ten]]></category>
		<category><![CDATA[wordbench]]></category>
		<category><![CDATA[wp3]]></category>
		<category><![CDATA[日本語]]></category>
		<category><![CDATA[日本語化]]></category>

		<guid isPermaLink="false">http://8bitodyssey.com/?p=1651</guid>
		<description><![CDATA[<p><img src="http://www.odysseygate.com/images/pero.jpg" style="float: left; margin: 2px 5px 1px 0px"/></p>
<p><img title="path" alt="" src="http://8bitodyssey.com/wp-content/themes/twentyten/images/headers/path.jpg" width="500" height="104" /></a></p>  <p>WordPress 3.0 より『Twenty Ten』がデフォルトテーマとなりましたが、<a href="http://ja.wordpress.org/2010/06/22/wordpress-30-ja/" target="_blank">WordPress 3.0 日本語版</a>でもソースコードに併記されている説明は諸々の理由で英語のままとなっています。</p>  <p>『Twenty Ten』は 3.0 の特徴となる機能がいくつも盛り込まれているのに加え、WordPress のテーマを理解する上でとても良いお手本となるものだと思いますので、より理解が深まることも願って、日本語化をしてみました。</p>  <p>（ただし例によって突貫工事＋眠気と闘いながら訳しましたので、若干 WordPress 日本語版と訳語がずれている箇所がありそうな気がします。もし見つけたらこっそり教えてくださいね^^;）</p> 
<span id="more-1651"></span>
  <h2>翻訳ファイル名一覧</h2>  <p><strong>twentyten</strong><br />
├ <a href="#tt_404">404.php</a>     <br />
├<a href="#tt_archive">archive.php</a>     <br />
├<a href="#tt_attachment">attachment.php</a></br />
├<a href="#tt_author">author.php</a></br />
├<a href="#tt_category">category.php</a></br />
├<a href="#tt_comments">comments.php</a></br />
├<a href="#tt_editor-style">editor-style.css</a></br />
├<a href="#tt_editor-style-rtl">editor-style-rtl.css</a></br />
├<a href="#tt_footer">footer.php</a></br />
├<a href="#tt_functions">functions.php</a></br />
├<a href="#tt_header">header.php</a></br />
├<a href="#tt_index">index.php</a></br />
├<a href="#tt_license">license.txt</a></br />
├<a href="#tt_loop">loop.php</a></br />
├<a href="#tt_onecolumn-page">onecolumn-page.php</a></br />
├<a href="#tt_page">page.php</a></br />
├<a href="#tt_rtl">rtl.css</a></br />
├<a href="#tt_search">search.php</a></br />
├<a href="#tt_sidebar">sidebar.php</a></br />
├<a href="#tt_sidebar-footer">sidebar-footer.php</a></br />
├<a href="#tt_single">single.php</a></br />
├<a href="#tt_style">style.css</a></br />
└<a href="#tt_tag">tag.php</a></br />
</p>

<h3><a id="tt_404">404.php</a></h3>
[php]
&lt;?php
/**
* 404ページ（見つかりません) を表示するためのテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?&gt;

     &lt;div id=&quot;container&quot;&gt;
          &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

               &lt;div id=&quot;post-0&quot; class=&quot;post error404 not-found&quot;&gt;
                    &lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php _e( 'Not Found', 'twentyten' ); ?&gt;&lt;/h1&gt;
                    &lt;div class=&quot;entry-content&quot;&gt;
                         &lt;p&gt;&lt;?php _e( 'Apologies, but the page you requested could not be found. Perhaps searching will help.', 'twentyten' ); ?&gt;&lt;/p&gt;
                         &lt;?php get_search_form(); ?&gt;
                    &lt;/div&gt;&lt;!-- .entry-content --&gt;
               &lt;/div&gt;&lt;!-- #post-0 --&gt;

          &lt;/div&gt;&lt;!-- #content --&gt;
     &lt;/div&gt;&lt;!-- #container --&gt;
     &lt;script type=&quot;text/javascript&quot;&gt;
          // ロード後に検索フィールドにフォーカスさせる
          document.getElementById('s') &amp;&amp; document.getElementById('s').focus();
     &lt;/script&gt;

&lt;?php get_footer(); ?&gt;
[/php]

<h3><a id="tt_archive">archive.php</a></h3>
[php]
&lt;?php
/**
* アーカイブページを表示するためのテンプレート。
*
* 問合せに一致するものが特にない場合にアーカイブページを表示するのに使用されます。
* 例えば、date.php ファイルがない場合に日付ベースのページとなります。
*
* 詳しくは: http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E9%9A%8E%E5%B1%A4
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?&gt;

          &lt;div id=&quot;container&quot;&gt;
               &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

&lt;?php
     /* 最初の記事を待ち行列に並べます。こうして、
      * 扱う時間がいつであるのか分かるのです。
      *
      * rewind_posts() へのコールで適切に
      * ループを走らせられるように、後でこれをリセットします。
      */
     if ( have_posts() )
          the_post();
?&gt;

               &lt;h1 class=&quot;page-title&quot;&gt;
&lt;?php if ( is_day() ) : ?&gt;
                    &lt;?php printf( __( 'Daily Archives: &lt;span&gt;%s&lt;/span&gt;', 'twentyten' ), get_the_date() ); ?&gt;
&lt;?php elseif ( is_month() ) : ?&gt;
                    &lt;?php printf( __( 'Monthly Archives: &lt;span&gt;%s&lt;/span&gt;', 'twentyten' ), get_the_date('F Y') ); ?&gt;
&lt;?php elseif ( is_year() ) : ?&gt;
                    &lt;?php printf( __( 'Yearly Archives: &lt;span&gt;%s&lt;/span&gt;', 'twentyten' ), get_the_date('Y') ); ?&gt;
&lt;?php else : ?&gt;
                    &lt;?php _e( 'Blog Archives', 'twentyten' ); ?&gt;
&lt;?php endif; ?&gt;
               &lt;/h1&gt;

&lt;?php
     /* 先に the_post() を呼んでいるので、
      * 適切に全部のループを走らせられるように、
      * ループを最初まで巻き戻す必要があります。
      */
     rewind_posts();

     /* アーカイブページの記事を出力するためにループを走らせます。
      * もし、子テーマでこれを上書きするなら、
      * loop-archives.php ファイルを含めると、そのファイルが代わりに使われます。
      */
      get_template_part( 'loop', 'archive' );
?&gt;

               &lt;/div&gt;&lt;!-- #content --&gt;
          &lt;/div&gt;&lt;!-- #container --&gt;

&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
[/php]

<h3><a id="tt_attachment">attachment.php</a></h3>
[php]
&lt;?php
/**
* 添付ファイルを表示するためのテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?&gt;

          &lt;div id=&quot;container&quot;&gt;
               &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

&lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&gt;

                    &lt;p class=&quot;page-title&quot;&gt;&lt;a href=&quot;&lt;?php echo get_permalink( $post-&gt;post_parent ); ?&gt;&quot; title=&quot;&lt;?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post-&gt;post_parent ) ) ); ?&gt;&quot; rel=&quot;gallery&quot;&gt;&lt;?php
                         /* 翻訳する人へ: %s には親記事のタイトルが入る */
                         printf( __( '&lt;span class=&quot;meta-nav&quot;&gt;&amp;larr;&lt;/span&gt; %s', 'twentyten' ), get_the_title( $post-&gt;post_parent ) );
                    ?&gt;&lt;/a&gt;&lt;/p&gt;

                    &lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;
                         &lt;h2 class=&quot;entry-title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;

                         &lt;div class=&quot;entry-meta&quot;&gt;
                              &lt;?php
                                   printf(__('&lt;span class=&quot;%1$s&quot;&gt;By&lt;/span&gt; %2$s', 'twentyten'),
                                        'meta-prep meta-prep-author',
                                        sprintf( '&lt;span class=&quot;author vcard&quot;&gt;&lt;a class=&quot;url fn n&quot; href=&quot;%1$s&quot; title=&quot;%2$s&quot;&gt;%3$s&lt;/a&gt;&lt;/span&gt;',
                                             get_author_posts_url( get_the_author_meta( 'ID' ) ),
                                             sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
                                             get_the_author()
                                        )
                                   );
                              ?&gt;
                              &lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt;
                              &lt;?php
                                   printf( __('&lt;span class=&quot;%1$s&quot;&gt;Published&lt;/span&gt; %2$s', 'twentyten'),
                                        'meta-prep meta-prep-entry-date',
                                        sprintf( '&lt;span class=&quot;entry-date&quot;&gt;&lt;abbr class=&quot;published&quot; title=&quot;%1$s&quot;&gt;%2$s&lt;/abbr&gt;&lt;/span&gt;',
                                             esc_attr( get_the_time() ),
                                             get_the_date()
                                        )
                                   );
                                   if ( wp_attachment_is_image() ) {
                                        echo ' &lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt; ';
                                        $metadata = wp_get_attachment_metadata();
                                        printf( __( 'Full size is %s pixels', 'twentyten'),
                                             sprintf( '&lt;a href=&quot;%1$s&quot; title=&quot;%2$s&quot;&gt;%3$s &amp;times; %4$s&lt;/a&gt;',
                                                  wp_get_attachment_url(),
                                                  esc_attr( __('Link to full-size image', 'twentyten') ),
                                                  $metadata['width'],
                                                  $metadata['height']
                                             )
                                        );
                                   }
                              ?&gt;
                              &lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;
                         &lt;/div&gt;&lt;!-- .entry-meta --&gt;

                         &lt;div class=&quot;entry-content&quot;&gt;
                              &lt;div class=&quot;entry-attachment&quot;&gt;
&lt;?php if ( wp_attachment_is_image() ) :
     $attachments = array_values( get_children( array( 'post_parent' =&gt; $post-&gt;post_parent, 'post_status' =&gt; 'inherit', 'post_type' =&gt; 'attachment', 'post_mime_type' =&gt; 'image', 'order' =&gt; 'ASC', 'orderby' =&gt; 'menu_order ID' ) ) );
     foreach ( $attachments as $k =&gt; $attachment ) {
          if ( $attachment-&gt;ID == $post-&gt;ID )
               break;
     }
     $k++;
     // ギャラリーにひとつ以上の添付画像がある場合
     if ( count( $attachments ) &gt; 1 ) {
          if ( isset( $attachments[ $k ] ) )
               // 次の添付画像の URL を取得します
               $next_attachment_url = get_attachment_link( $attachments[ $k ]-&gt;ID );
          else
               // あるいは最初の添付画像の URL を取得します
               $next_attachment_url = get_attachment_link( $attachments[ 0 ]-&gt;ID );
     } else {
          // あるいは、添付画像がたったひとつの場合、その添付画像の URL を取得します
          $next_attachment_url = wp_get_attachment_url();
     }
?&gt;
                              &lt;p class=&quot;attachment&quot;&gt;&lt;a href=&quot;&lt;?php echo $next_attachment_url; ?&gt;&quot; title=&quot;&lt;?php echo esc_attr( get_the_title() ); ?&gt;&quot; rel=&quot;attachment&quot;&gt;&lt;?php
                                   $attachment_size = apply_filters( 'twentyten_attachment_size', 900 );
                                   echo wp_get_attachment_image( $post-&gt;ID, array( $attachment_size, 9999 ) ); // 基本的に画像の高さは制限せず、画像の長さをフィルターで変更できます。
                              ?&gt;&lt;/a&gt;&lt;/p&gt;

                              &lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&gt;
                                   &lt;div class=&quot;nav-previous&quot;&gt;&lt;?php previous_image_link( false ); ?&gt;&lt;/div&gt;
                                   &lt;div class=&quot;nav-next&quot;&gt;&lt;?php next_image_link( false ); ?&gt;&lt;/div&gt;
                              &lt;/div&gt;&lt;!-- #nav-below --&gt;
&lt;?php else : ?&gt;
                              &lt;a href=&quot;&lt;?php echo wp_get_attachment_url(); ?&gt;&quot; title=&quot;&lt;?php echo esc_attr( get_the_title() ); ?&gt;&quot; rel=&quot;attachment&quot;&gt;&lt;?php echo basename( get_permalink() ); ?&gt;&lt;/a&gt;
&lt;?php endif; ?&gt;
                              &lt;/div&gt;&lt;!-- .entry-attachment --&gt;
                              &lt;div class=&quot;entry-caption&quot;&gt;&lt;?php if ( !empty( $post-&gt;post_excerpt ) ) the_excerpt(); ?&gt;&lt;/div&gt;

&lt;?php the_content( __( 'Continue reading &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ) ); ?&gt;
&lt;?php wp_link_pages( array( 'before' =&gt; '&lt;div class=&quot;page-link&quot;&gt;' . __( 'Pages:', 'twentyten' ), 'after' =&gt; '&lt;/div&gt;' ) ); ?&gt;

                         &lt;/div&gt;&lt;!-- .entry-content --&gt;

                         &lt;div class=&quot;entry-utility&quot;&gt;
                              &lt;?php twentyten_posted_in(); ?&gt;
                              &lt;?php edit_post_link( __( 'Edit', 'twentyten' ), ' &lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;
                         &lt;/div&gt;&lt;!-- .entry-utility --&gt;
                    &lt;/div&gt;&lt;!-- #post-## --&gt;

&lt;?php comments_template(); ?&gt;

&lt;?php endwhile; ?&gt;

               &lt;/div&gt;&lt;!-- #content --&gt;
          &lt;/div&gt;&lt;!-- #container --&gt;

&lt;?php get_footer(); ?&gt;
[/php]

<h3><a id="tt_author">author.php</a></h3>
[php]
&lt;?php
/**
* 作者別アーカイブページを表示するテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?&gt;

          &lt;div id=&quot;container&quot;&gt;
               &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

&lt;?php
     /* 最初の記事を待ち行列に並べます。こうして、
      * 作者の名前、URL、説明、アバターなどを知ろうとするときに
      * 作者が誰であるか分かるのです。
      *
      * rewind_posts() へのコールで適切に
      * ループを走らせられるように、後でこれをリセットします。
      */
     if ( have_posts() )
          the_post();
?&gt;

                    &lt;h1 class=&quot;page-title author&quot;&gt;&lt;?php printf( __( 'Author Archives: %s', 'twentyten' ), &quot;&lt;span class='vcard'&gt;&lt;a class='url fn n' href='&quot; . get_author_posts_url( get_the_author_meta( 'ID' ) ) . &quot;' title='&quot; . esc_attr( get_the_author() ) . &quot;' rel='me'&gt;&quot; . get_the_author() . &quot;&lt;/a&gt;&lt;/span&gt;&quot; ); ?&gt;&lt;/h1&gt;

&lt;?php
// ユーザが説明を記入している場合、エントリーに略歴を表示します。
if ( get_the_author_meta( 'description' ) ) : ?&gt;
                         &lt;div id=&quot;entry-author-info&quot;&gt;
                              &lt;div id=&quot;author-avatar&quot;&gt;
                                   &lt;?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?&gt;
                              &lt;/div&gt;&lt;!-- #author-avatar --&gt;
                              &lt;div id=&quot;author-description&quot;&gt;
                                   &lt;h2&gt;&lt;?php printf( __( 'About %s', 'twentyten' ), get_the_author() ); ?&gt;&lt;/h2&gt;
                                   &lt;?php the_author_meta( 'description' ); ?&gt;
                              &lt;/div&gt;&lt;!-- #author-description     --&gt;
                         &lt;/div&gt;&lt;!-- #entry-author-info --&gt;
&lt;?php endif; ?&gt;

&lt;?php
     /* 先に the_post() を呼んでいるので、
      * 適切に全部のループを走らせられるように、
      * ループを最初まで巻き戻す必要があります。
      */
     rewind_posts();

     /* 作者のアーカイブページの記事を出力するためにループを走らせます。
      * もし、子テーマでこれを上書きするなら、
      * loop-author.php ファイルを含めると、そのファイルが代わりに使われます。
      */
      get_template_part( 'loop', 'author' );
?&gt;
               &lt;/div&gt;&lt;!-- #content --&gt;
          &lt;/div&gt;&lt;!-- #container --&gt;

&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
[/php]

<h3><a id="tt_category">category.php</a></h3>
[php]
&lt;?php
/**
* カテゴリー別アーカイブページを表示するテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?&gt;

         &lt;div id=&quot;container&quot;&gt;
              &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

                   &lt;h1 class=&quot;page-title&quot;&gt;&lt;?php
                        printf( __( 'Category Archives: %s', 'twentyten' ), '&lt;span&gt;' . single_cat_title( '', false ) . '&lt;/span&gt;' );
                   ?&gt;&lt;/h1&gt;
                   &lt;?php
                        $category_description = category_description();
                        if ( ! empty( $category_description ) )
                             echo '&lt;div class=&quot;archive-meta&quot;&gt;' . $category_description . '&lt;/div&gt;';

                   /* カテゴリーページの記事を出力するためにループを走らせます。
                    * もし、子テーマでこれを上書きするなら、
                    * loop-category.php ファイルを含めると、そのファイルが代わりに使われます。
                    */
                   get_template_part( 'loop', 'category' );
                   ?&gt;

              &lt;/div&gt;&lt;!-- #content --&gt;
         &lt;/div&gt;&lt;!-- #container --&gt;

&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
[/php]

<h3><a id="tt_comments">comments.php</a></h3>
[php]
&lt;?php
/**
* コメントを表示するためのテンプレート。
*
* いまあるコメントとコメントフォームの両方を含むページのエリア。
* 実際のコメント表示は
* functions.php ファイルにある twentyten_comment への呼び戻し
* によって処理されます。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?&gt;

              &lt;div id=&quot;comments&quot;&gt;
&lt;?php if ( post_password_required() ) : ?&gt;
                   &lt;p class=&quot;nopassword&quot;&gt;&lt;?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?&gt;&lt;/p&gt;
              &lt;/div&gt;&lt;!-- #comments --&gt;
&lt;?php
         /* comments.php の残りが処理されるのを止めます。
          * でないと、スクリプトを丸ごと殺せず、つまり依然として
          * テンプレートを完全に読み込まなくてはならないからです。
          */
         return;
    endif;
?&gt;

&lt;?php
    // ここは編集することができます。このコメントを含めて！
?&gt;

&lt;?php if ( have_comments() ) : ?&gt;
              &lt;h3 id=&quot;comments-title&quot;&gt;&lt;?php
              printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
              number_format_i18n( get_comments_number() ), '&lt;em&gt;' . get_the_title() . '&lt;/em&gt;' );
              ?&gt;&lt;/h3&gt;

&lt;?php if ( get_comment_pages_count() &gt; 1 &amp;&amp; get_option( 'page_comments' ) ) : // 検索するためにコメントがありますか？ ?&gt;
              &lt;div class=&quot;navigation&quot;&gt;
                   &lt;div class=&quot;nav-previous&quot;&gt;&lt;?php previous_comments_link( __( '&lt;span class=&quot;meta-nav&quot;&gt;&amp;larr;&lt;/span&gt; Older Comments', 'twentyten' ) ); ?&gt;&lt;/div&gt;
                   &lt;div class=&quot;nav-next&quot;&gt;&lt;?php next_comments_link( __( 'Newer Comments &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ) ); ?&gt;&lt;/div&gt;
              &lt;/div&gt; &lt;!-- .navigation --&gt;
&lt;?php endif; // コメントナビゲージョンのためのチェック ?&gt;

              &lt;ol class=&quot;commentlist&quot;&gt;
                   &lt;?php
                        /* コメントをループし、並べます。コメントをフォーマットするため
                         * wp_list_comments() に twentyten_comment() を使うようにさせます。
                         * 子テーマでこれを上書きしたいなら、
                         * twentyten_comment() を定義すると、それが代わりに使われます。
                         * 詳しくは、twentyten/functions.php の twentyten_comment() を見てください。
                         */
                        wp_list_comments( array( 'callback' =&gt; 'twentyten_comment' ) );
                   ?&gt;
              &lt;/ol&gt;

&lt;?php if ( get_comment_pages_count() &gt; 1 &amp;&amp; get_option( 'page_comments' ) ) : // 検索するためにコメントがありますか？ ?&gt;
              &lt;div class=&quot;navigation&quot;&gt;
                   &lt;div class=&quot;nav-previous&quot;&gt;&lt;?php previous_comments_link( __( '&lt;span class=&quot;meta-nav&quot;&gt;&amp;larr;&lt;/span&gt; Older Comments', 'twentyten' ) ); ?&gt;&lt;/div&gt;
                   &lt;div class=&quot;nav-next&quot;&gt;&lt;?php next_comments_link( __( 'Newer Comments &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ) ); ?&gt;&lt;/div&gt;
              &lt;/div&gt;&lt;!-- .navigation --&gt;
&lt;?php endif; // コメントナビゲージョンのためのチェック ?&gt;

&lt;?php else : // あるいは、コメントがない場合:

    /* コメントが全くない場合や、コメントが閉じられている場合、
     * ささやかな注釈を残しましょう、ですよね？
     */
    if ( ! comments_open() ) :
?&gt;
    &lt;p class=&quot;nocomments&quot;&gt;&lt;?php _e( 'Comments are closed.', 'twentyten' ); ?&gt;&lt;/p&gt;
&lt;?php endif; // comments_open() の最後 ?&gt;

&lt;?php endif; // have_comments() の最後 ?&gt;

&lt;?php comment_form(); ?&gt;

&lt;/div&gt;&lt;!-- #comments --&gt;
[/php]

<h3><a id="tt_editor-style">editor-style.css</a></h3>
[css]
/*
Theme Name: Twenty Ten
*/
/*
TinyMCE エディターにスタイルを設定するのに使用される。
*/
html .mceContentBody {
     max-width:640px;
}
* {
     font-family: Georgia, &quot;Bitstream Charter&quot;, serif;
     color: #444;
     line-height: 1.5;
}
p,
dl,
td,
th,
ul,
ol,
blockquote {
     font-size: 16px;
}
tr th,
thead th,
label,
tr th,
thead th {
     font-family: &quot;Helvetica Neue&quot;, Arial, Helvetica, &quot;Nimbus Sans L&quot;, sans-serif;
}
pre {
     font-family: &quot;Courier 10 Pitch&quot;, Courier, monospace;
}
code, code var {
     font-family: Monaco, Consolas, &quot;Andale Mono&quot;, &quot;DejaVu Sans Mono&quot;, monospace;
}
body, input, textarea {
     font-size: 12px;
     line-height: 18px;
}
hr {
     background-color: #E7E7E7;
     border:0;
     height: 1px;
     margin-bottom: 18px;
     clear:both;
}
/* テキスト要素 */
p {
     margin-bottom: 18px;
}
ul {
     list-style: square;
     margin: 0 0 18px 1.5em;
}
ol {
     list-style: decimal;
     margin: 0 0 18px 1.5em;
}
ol ol {
     list-style:upper-alpha;
}
ol ol ol {
     list-style:lower-roman;
}
ol ol ol ol {
     list-style:lower-alpha;
}
ul ul,
ol ol,
ul ol,
ol ul {
     margin-bottom:0;
}
dl {
     margin:0 0 24px 0;
}
dt {
     font-weight: bold;
}
dd {
     margin-bottom: 18px;
}
strong {
     font-weight: bold;
     color: #000;
}
cite,
em,
i {
     font-style: italic;
     border: none;
}
big {
     font-size: 131.25%;
}
ins {
     background: #FFFFCC;
     border: none;
     color: #333;
}
del {
     text-decoration: line-through;
     color: #555;
}
blockquote {
     font-style: italic;
     padding: 0 3em;
}
blockquote cite,
blockquote em,
blockquote i {
     font-style: normal;
}
pre {
     background: #f7f7f7;
     color: #222;
     line-height: 18px;
     margin-bottom: 18px;
     padding: 1.5em;
}
abbr,
acronym {
     border-bottom: 1px dotted #666;
     cursor: help;
}
ins {
     text-decoration: none;
}
sup,
sub {
     height: 0;
     line-height: 1;
     vertical-align: baseline;
     position: relative;
     font-size: 10px;
}
sup {
     bottom: 1ex;
}
sub {
     top: .5ex;
}
a:link {
     color:#0066CC;
}
a:visited {
     color:#743399;
}
a:active,
a:hover {
     color: #FF4B33;
}
p,
ul,
ol,
dd,
pre,
hr {
     margin-bottom:24px;
}
ul ul,
ol ol,
ul ol,
ol ul {
     margin-bottom:0;
}
pre,
kbd,
tt,
var {
     font-size: 15px;
     line-height: 21px;
}
code {
     font-size: 13px;
}
strong,
b,
dt,
th {
     color: #000;
}
h1,
h2,
h3,
h4,
h5,
h6 {
     color: #000;
     margin: 0 0 20px 0;
     line-height: 1.5em;
     font-weight: normal;
}
h1 {
     font-size: 2.4em;
}
h2 {
     font-size: 1.8em;
}
h3 {
     font-size: 1.4em;
}
h4 {
     font-size: 1.2em;
}
h5 {
     font-size: 1em;
}
h6 {
     font-size: 0.9em;
}
table {
     border: 1px solid #e7e7e7 !important;
     text-align: left;
     margin: 0 -1px 24px 0;
     width: 100%;
     border-collapse: collapse;
     border-spacing: 0;
}
tr th,
thead th {
     border: none !important;
     color: #888;
     font-size: 12px;
     font-weight: bold;
     line-height: 18px;
     padding: 9px 24px;
}
tr td {
     border: none !important;
     border-top: 1px solid #e7e7e7 !important;
     padding: 6px 24px;
}


img {
     margin: 0;
     max-width: 640px;
}
.alignleft,
img.alignleft {
     display: inline;
     float: left;
     margin-right: 24px;
     margin-top: 4px;
}
.alignright,
img.alignright {
     display: inline;
     float: right;
     margin-left: 24px;
     margin-top: 4px;
}
.aligncenter,
img.aligncenter {
     clear: both;
     display: block;
     margin-left: auto;
     margin-right: auto;
}
img.alignleft,
img.alignright,
img.aligncenter {
     margin-bottom: 12px;
}
.wp-caption {
     border: none;
     background: #f1f1f1;
     color: #888;
     font-size: 12px;
     line-height: 18px;
     text-align: center;
     margin-bottom: 20px;
     padding: 4px;
     -moz-border-radius: 0;
     -khtml-border-radius: 0;
     -webkit-border-radius: 0;
     border-radius: 0;
}
.wp-caption img {
     margin: 5px;
}
.wp-caption p.wp-caption-text {
     margin: 0 0 4px;
}
.wp-smiley {
     margin:0;
}
[/css]

<h3><a id="tt_editor-style-rtl">editor-style-rtl.css</a></h3>
[php]
/*
Theme Name: Twenty Ten
*/
/*
TinyMCE エディターにスタイルを設定するのに使用される。
*/
html .mceContentBody{
     direction:rtl;
     unicode-bidi:embed;
     float:right;
}
* {
     font-family: Arial, Tahoma, sans-serif;
}
/* テキスト要素 */
ul {
     margin: 0 -18px 18px 0;
}
ol {
     margin: 0 -18px 18px 0;
}
dd {
     margin-right: 0;
}
blockquote {
     font-style: normal;
}
table {
     text-align: right;
     margin: 0 0 24px -1px;
}
html .mceContentBody{
     direction:rtl;
     unicode-bidi:embed;
     float:right;
}
* {
     font-family: Arial, Tahoma, sans-serif;
}
/* テキスト要素 */
ul {
     margin: 0 -18px 18px 0;
}
ol {
     margin: 0 -18px 18px 0;
}
dd {
     margin-right: 0;
}
blockquote {
     font-style: normal;
}
table {
     text-align: right;
     margin: 0 0 24px -1px;
}
[/php]


<h3><a id="tt_footer">footer.php</a></h3>
[php]
&lt;?php
/**
* フッターを表示するためのテンプレート。
*
* id=main の div 要素を閉じ、すべての要素の後にきます。
* 底部のウィジェットを表示するための sidebar-footer.php を呼び出します。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?&gt;
     &lt;/div&gt;&lt;!-- #main --&gt;

     &lt;div id=&quot;footer&quot; role=&quot;contentinfo&quot;&gt;
          &lt;div id=&quot;colophon&quot;&gt;

&lt;?php
     /* フッターにサイドバーですって？ その通り。
      * 四列のウィジェットでフッターをカスタマイズできるんです。
      */
     get_sidebar( 'footer' );
?&gt;

               &lt;div id=&quot;site-info&quot;&gt;
                    &lt;a href=&quot;&lt;?php echo home_url( '/' ) ?&gt;&quot; title=&quot;&lt;?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?&gt;&quot; rel=&quot;home&quot;&gt;
                         &lt;?php bloginfo( 'name' ); ?&gt;
                    &lt;/a&gt;
               &lt;/div&gt;&lt;!-- #site-info --&gt;

               &lt;div id=&quot;site-generator&quot;&gt;
                    &lt;?php do_action( 'twentyten_credits' ); ?&gt;
                    &lt;a href=&quot;&lt;?php echo esc_url( __('http://wordpress.org/', 'twentyten') ); ?&gt;&quot;
                              title=&quot;&lt;?php esc_attr_e('Semantic Personal Publishing Platform', 'twentyten'); ?&gt;&quot; rel=&quot;generator&quot;&gt;
                         &lt;?php printf( __('Proudly powered by %s.', 'twentyten'), 'WordPress' ); ?&gt;
                    &lt;/a&gt;
               &lt;/div&gt;&lt;!-- #site-generator --&gt;

          &lt;/div&gt;&lt;!-- #colophon --&gt;
     &lt;/div&gt;&lt;!-- #footer --&gt;

&lt;/div&gt;&lt;!-- #wrapper --&gt;

&lt;?php
     /* wp_footer() はいつも、テーマの &lt;/body&gt; タグの直後にあります。
      * そうでないと、このフックを使って JavaScript ファイルを参照する
      * 多くのプラグインの動作を止めてしまうでしょう。
      */

     wp_footer();
?&gt;
&lt;/body&gt;
&lt;/html&gt;
[/php]

<h3><a id="tt_functions">functions.php</a></h3>
[php]
&lt;?php
/**
* TwentyTen の機能と定義
*
* テーマをセットアップし、ヘルパー機能を提供します。一部のヘルパー機能は
* テーマの中でカスタムテンプレートタグとして使用されます。それ以外のものは、
* WordPress のコア機能を変更するアクションとフィルターフックに取り付けられます。
*
* 最初の機能は、 twentyten_setup() で、投稿サムネイルやナビゲーションメニューなど、
* WordPress の様々な機能のサポートをすることによってテーマを設定します。
*
* 子テーマを使うときは (詳しくは http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%BC%E3%83%9E%E3%81%AE%E4%BD%9C%E6%88%90 と
* http://wpdocs.sourceforge.jp/Child_Themes を見てください。)、子テーマの functions.php ファイルで機能を定義することで
* 上書きすることが出来ます(機能は、 function_exists() 呼び出しで囲われています) 。
* 子テーマの functions.php ファイルは親テーマファイルの前にインクルードされ、
* 子テーマの機能が使われます。
*
* 取り外せない機能（function_exists()で囲われていないもの）は、代わりに
* フィルターあるいはアクションフックに割り当てられています。フックは、remove_action() あるいは
* remove_filter() を使うことによって取り除くことができ、各自必要な機能をフックに割り当てることが出来ます。
*
* 親テーマのフックは割り当てられた後のみ取り外すことができます。これはつまり、子テーマの
* セットアップを終わるまで待つ必要があるということです。:
*
* &lt;code&gt;
* add_action( 'after_setup_theme', 'my_child_theme_setup' );
* function my_child_theme_setup() {
*     // excerpt_length （あるいは、フィルターされていない値）に独自のフィルターをかけています。
*     remove_filter( 'excerpt_length', 'twentyten_excerpt_length' );
*     ...
* }
* &lt;/code&gt;
*
* フック、アクション、フィルターに関するさらに詳しい情報は、 http://wpdocs.sourceforge.jp/%E3%83%97%E3%83%A9%E3%82%B0%E3%82%A4%E3%83%B3_API を御覧ください。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

/**
* テーマデザインとスタイルシートに基づいて、コンテンツの長さを設定します。
*
* 画像とコンテンツの長さを設定するのに使われます。一般に style.css スタイルシートを通して
* テーマデザインにあった長さと同じにするべきでしょう。
*/
if ( ! isset( $content_width ) )
    $content_width = 640;

/** 'after_setup_theme' フックが走ったら、twentyten_setup() を走らせます。 */
add_action( 'after_setup_theme', 'twentyten_setup' );

if ( ! function_exists( 'twentyten_setup' ) ):
/**
* 様々な WordPress の特徴をサポートするテーマデフォルトとレジスタをセットアップします。
*
* この function が after_setup_theme にフックされていて、init フックの前に走ることに注意してください。
* この init フックは、例えば投稿サムネイルのサポートの表示など、いくつかの特徴によっては
* 遅すぎるかもしれません（訳注：実行順を早めてあげる必要がある、ということだと思います）。
*
* 子テーマで twentyten_setup() を上書きするには、子テーマの functions.php ファイルに
* 独自の twentyten_setup を追加してください。
*
* @uses add_theme_support() 投稿サムネイルと自動フィードリンクをサポートします。
* @uses register_nav_menus() To ナビゲーションメニューをサポートします。
* @uses add_custom_background() カスタム背景をサポートします。
* @uses add_editor_style() ビジュアルエディターのスタイル変更をサポートします。
* @uses load_theme_textdomain() 翻訳／国際化をサポートします。
* @uses add_custom_image_header() カスタムヘッダーをサポートします。
* @uses register_default_headers() テーマに用意されるデフォルトのカスタムヘッダー画像を登録します。
* @uses set_post_thumbnail_size() 投稿サムネイルのサイズを設定します。
*
* @since Twenty Ten 1.0
*/
function twentyten_setup() {

    // このテーマでは、テーマスタイルに合うように、editor-style.css でビジュアルエディタをスタイル付けします。
    add_editor_style();

    // このテーマでは投稿サムネイルを使用します。
    add_theme_support( 'post-thumbnails' );

    // デフォルトの記事 RSS フィードと、コメント RSS フィード を &lt;head&gt; 内に追加します。
    add_theme_support( 'automatic-feed-links' );

    // テーマを翻訳できるようにします。
    // 翻訳ファイルは /languages/ ディレクトリ内に置くことが出来ます。
    load_theme_textdomain( 'twentyten', TEMPLATEPATH . '/languages' );

    $locale = get_locale();
    $locale_file = TEMPLATEPATH . &quot;/languages/$locale.php&quot;;
    if ( is_readable( $locale_file ) )
         require_once( $locale_file );

    // このテーマはある位置で、 wp_nav_menu() を使います。
    register_nav_menus( array(
         'primary' =&gt; __( 'Primary Navigation', 'twentyten' ),
    ) );

    // このテーマでは、カスタム背景を設定できます。
    add_custom_background();

    // ヘッダーの変更はここから始まります。
    define( 'HEADER_TEXTCOLOR', '' );
    // CSSはなく、IMG を呼び出します。%s は、テーマテンプレートディレクトリの URL に取って代わります。
    define( 'HEADER_IMAGE', '%s/images/headers/path.jpg' );

    // カスタムヘッダーの高さと長さ。テーマ独自のフィルターを使って、この値を変更できます。
    // この値を変更するには、twentyten_header_image_width と twentyten_header_image_height にフィルターを追加します。
    define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) );
    define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) );

    // 記事とページのカスタムヘッダー画像に投稿サムネイルを使っています。
    // 画像の大きさは長さ940ピクセル、高さ198ピクセルが望ましいです。
    // それより大きな画像はフィットするように自動的にトリミングし、小さな画像は無視されます。詳しくは header.php ファイルを見てください。
    set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );

    // ヘッダー画像の中にテキストを入れないようにします。
    define( 'NO_HEADER_TEXT', true );

    // カスタムヘッダーの管理画面で、カスタムヘッダーを装飾できるようにします。
    // 詳しくは下の twentyten_admin_header_style() を見てください。
    add_custom_image_header( '', 'twentyten_admin_header_style' );

    // ... ヘッダーの変更関連はここまでです。

    // テーマにパッケージされたデフォルトのカスタムヘッダーです。%s は、テーマテンプレートディレクトリの URL に取って代わります。
    register_default_headers( array(
         'berries' =&gt; array(
              'url' =&gt; '%s/images/headers/berries.jpg',
              'thumbnail_url' =&gt; '%s/images/headers/berries-thumbnail.jpg',
              /* 翻訳者へ: ヘッダー画像の説明 */
              'description' =&gt; __( 'Berries', 'twentyten' )
         ),
         'cherryblossom' =&gt; array(
              'url' =&gt; '%s/images/headers/cherryblossoms.jpg',
              'thumbnail_url' =&gt; '%s/images/headers/cherryblossoms-thumbnail.jpg',
              /* 翻訳者へ: ヘッダー画像の説明 */
              'description' =&gt; __( 'Cherry Blossoms', 'twentyten' )
         ),
         'concave' =&gt; array(
              'url' =&gt; '%s/images/headers/concave.jpg',
              'thumbnail_url' =&gt; '%s/images/headers/concave-thumbnail.jpg',
              /* 翻訳者へ: ヘッダー画像の説明 */
              'description' =&gt; __( 'Concave', 'twentyten' )
         ),
         'fern' =&gt; array(
              'url' =&gt; '%s/images/headers/fern.jpg',
              'thumbnail_url' =&gt; '%s/images/headers/fern-thumbnail.jpg',
              /* 翻訳者へ: ヘッダー画像の説明 */
              'description' =&gt; __( 'Fern', 'twentyten' )
         ),
         'forestfloor' =&gt; array(
              'url' =&gt; '%s/images/headers/forestfloor.jpg',
              'thumbnail_url' =&gt; '%s/images/headers/forestfloor-thumbnail.jpg',
              /* 翻訳者へ: ヘッダー画像の説明 */
              'description' =&gt; __( 'Forest Floor', 'twentyten' )
         ),
         'inkwell' =&gt; array(
              'url' =&gt; '%s/images/headers/inkwell.jpg',
              'thumbnail_url' =&gt; '%s/images/headers/inkwell-thumbnail.jpg',
              /* 翻訳者へ: ヘッダー画像の説明 */
              'description' =&gt; __( 'Inkwell', 'twentyten' )
         ),
         'path' =&gt; array(
              'url' =&gt; '%s/images/headers/path.jpg',
              'thumbnail_url' =&gt; '%s/images/headers/path-thumbnail.jpg',
              /* 翻訳者へ: ヘッダー画像の説明 */
              'description' =&gt; __( 'Path', 'twentyten' )
         ),
         'sunset' =&gt; array(
              'url' =&gt; '%s/images/headers/sunset.jpg',
              'thumbnail_url' =&gt; '%s/images/headers/sunset-thumbnail.jpg',
              /* 翻訳者へ: ヘッダー画像の説明 */
              'description' =&gt; __( 'Sunset', 'twentyten' )
         )
    ) );
}
endif;

if ( ! function_exists( 'twentyten_admin_header_style' ) ) :
/**
* 外観 &gt; ヘッダー に表示されるヘッダー画像をスタイル付けします。
*
* twentyten_setup() の add_custom_image_header() を通して参照します。
*
* @since Twenty Ten 1.0
*/
function twentyten_admin_header_style() {
?&gt;
&lt;style type=&quot;text/css&quot;&gt;
/* フロンドエンドと同じボーダーを表示します。
#headimg {
    border-bottom: 1px solid #000;
    border-top: 4px solid #000;
}
/* NO_HEADER_TEXT が false であれば、このセレクターでテキストをスタイル付けできます。:
    #headimg #name { }
    #headimg #desc { }
*/
&lt;/style&gt;
&lt;?php
}
endif;

/**
* wp_title() の出力をフィルターすることで、&lt;title&gt; タグを変更します。
*
* サイトの説明があり、ホームページかブログの記事のページを表示しているなら、
* （つまり、固定のフロントページを使っているとき）、サイトの説明を追加します。
*
* もし、検索結果を表示しているなら、タイトルをまるごと再現します。
* すべてのタイトルに、検索結果のタイトルの中程と、すべてのタイトルの終りに、
* ページ番号を追加します。
*
* サイト名もすべてのタイトルに追加します。
*
* @since Twenty Ten 1.0
*
* @param string $title wp_title() によって作られるタイトル
* @param string $separator wp_title() を通る区切り。 Twenty Ten は
* header.php にて垂直の棒 &quot;|&quot;, を区切りとして使います。
* @return string &lt;title&gt; タグ用の新しいタイトル
*/
function twentyten_filter_wp_title( $title, $separator ) {
    // フィードの wp_title() 呼び出しには影響しません。
    if ( is_feed() )
         return $title;

    // グローバル変数 $paged は 記事を並べる際のページ番号を含みます。
    // グローバル変数 $page は番号を振られた記事のページ番号を含みます。
    // 最初のページを見ているのでなければ、どちらが適用されていても表示します。
    global $paged, $page;

    if ( is_search() ) {
         // 検索であれば、やり直します。:

         $title = sprintf( __( 'Search results for %s', 'twentyten' ), '&quot;' . get_search_query() . '&quot;' );
         // 2ページ目以降であれば、ページ番号を追加します。:
         if ( $paged &gt;= 2 )
              $title .= &quot; $separator &quot; . sprintf( __( 'Page %s', 'twentyten' ), $paged );
         // 終りにサイト名を追加します。:
         $title .= &quot; $separator &quot; . get_bloginfo( 'name', 'display' );
         // おしまい。wp_title() に新しいタイトルを送ります :
         return $title;
    }

    // そうでなければ、終りにサイト名を追加します。:
    $title .= get_bloginfo( 'name', 'display' );

    // サイトの説明があって、ホーム/フロントページであれば、説明を追加します。:
    $site_description = get_bloginfo( 'description', 'display' );
    if ( $site_description &amp;&amp; ( is_home() || is_front_page() ) )
         $title .= &quot; $separator &quot; . $site_description;

    // 必要であれば、ページ番号を追加します。:
    if ( $paged &gt;= 2 || $page &gt;= 2 )
         $title .= &quot; $separator &quot; . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );

    // 新しいタイトルを wp_title() に返します。:
    return $title;
}
add_filter( 'wp_title', 'twentyten_filter_wp_title', 10, 2 );

/**
* ホームリンクを表示するのに、 wp_nav_menu() 、 wp_page_menu() を引っ込めます。
*
* 子テーマでこれを上書きするには、フィルターを削除し、
* wp_page_menu_args フィルターフックへと結ばれる function を追加してください。
*
* @since Twenty Ten 1.0
*/
function twentyten_page_menu_args( $args ) {
    $args['show_home'] = true;
    return $args;
}
add_filter( 'wp_page_menu_args', 'twentyten_page_menu_args' );

/**
* 記事の抜粋の長さを40文字に設定します。
*
* これを子テーマで上書きするには、フィルターを削除し、
* excerpt_length フィルターフックと結ばれる function を追加してください。
*
* @since Twenty Ten 1.0
* @return int
*/
function twentyten_excerpt_length( $length ) {
    return 40;
}
add_filter( 'excerpt_length', 'twentyten_excerpt_length' );

/**
* 抜粋に &quot;続きを読む&quot; リンクを返します。
*
* @since Twenty Ten 1.0
* @return string &quot;続きを読む&quot; リンク
*/
function twentyten_continue_reading_link() {
    return ' &lt;a href=&quot;'. get_permalink() . '&quot;&gt;' . __( 'Continue reading &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ) . '&lt;/a&gt;';
}

/**
* 省略記号と twentyten_continue_reading_link() で &quot;[...]&quot; を置き換えます（自動的に作られる抜粋に付け加えて）。
*
* これを子テーマで上書きするには、フィルターを取り除き、excerpt_more フィルターフックと結ばれる
* function を追加してください。
*
* @since Twenty Ten 1.0
* @return string An ellipsis
*/
function twentyten_auto_excerpt_more( $more ) {
    return ' &amp;hellip;' . twentyten_continue_reading_link();
}
add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );

/**
* カスタム投稿の抜粋に &quot;続きを読む&quot; リンクを加えます。
*
* これを子テーマで上書きするには、フィルターを取り除き、get_the_excerpt フィルターフック と結ばれる
* function を追加してください。
*
* @since Twenty Ten 1.0
* @return string Excerpt with a pretty &quot;Continue Reading&quot; link
*/
function twentyten_custom_excerpt_more( $output ) {
    if ( has_excerpt() &amp;&amp; ! is_attachment() ) {
         $output .= twentyten_continue_reading_link();
    }
    return $output;
}
add_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' );

/**
* ギャラリーのショートコードが使われるときに印字されるインラインスタイルを除去します。
*
* ギャラリーは Twenty Ten の style.css でスタイル付されています。
*
* @since Twenty Ten 1.0
* @return string ギャラリースタイルフィルターで、スタイルは除去されます。
*/
function twentyten_remove_gallery_css( $css ) {
    return preg_replace( &quot;#&lt;style type='text/css'&gt;(.*?)&lt;/style&gt;#s&quot;, '', $css );
}
add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );

if ( ! function_exists( 'twentyten_comment' ) ) :
/**
* コメントとピンバックのテンプレート。
*
* コメントテンプレートを修正することなく子テーマでこれを上書きするには
* 独自の twentyten_comment() を作ると、その function が代わりに使用されます。
*
* コメントを表示するための wp_list_comments() による呼び戻しとして使われています。
*
* @since Twenty Ten 1.0
*/
function twentyten_comment( $comment, $args, $depth ) {
    $GLOBALS['comment'] = $comment;
    switch ( $comment-&gt;comment_type ) :
         case '' :
    ?&gt;
    &lt;li &lt;?php comment_class(); ?&gt; id=&quot;li-comment-&lt;?php comment_ID(); ?&gt;&quot;&gt;
         &lt;div id=&quot;comment-&lt;?php comment_ID(); ?&gt;&quot;&gt;
         &lt;div class=&quot;comment-author vcard&quot;&gt;
              &lt;?php echo get_avatar( $comment, 40 ); ?&gt;
              &lt;?php printf( __( '%s &lt;span class=&quot;says&quot;&gt;says:&lt;/span&gt;', 'twentyten' ), sprintf( '&lt;cite class=&quot;fn&quot;&gt;%s&lt;/cite&gt;', get_comment_author_link() ) ); ?&gt;
         &lt;/div&gt;&lt;!-- .comment-author .vcard --&gt;
         &lt;?php if ( $comment-&gt;comment_approved == '0' ) : ?&gt;
              &lt;em&gt;&lt;?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?&gt;&lt;/em&gt;
              &lt;br /&gt;
         &lt;?php endif; ?&gt;

         &lt;div class=&quot;comment-meta commentmetadata&quot;&gt;&lt;a href=&quot;&lt;?php echo esc_url( get_comment_link( $comment-&gt;comment_ID ) ); ?&gt;&quot;&gt;
              &lt;?php
                   /* 翻訳者へ: 1: 日付, 2: 時間 */
                   printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?&gt;&lt;/a&gt;&lt;?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );
              ?&gt;
         &lt;/div&gt;&lt;!-- .comment-meta .commentmetadata --&gt;

         &lt;div class=&quot;comment-body&quot;&gt;&lt;?php comment_text(); ?&gt;&lt;/div&gt;

         &lt;div class=&quot;reply&quot;&gt;
              &lt;?php comment_reply_link( array_merge( $args, array( 'depth' =&gt; $depth, 'max_depth' =&gt; $args['max_depth'] ) ) ); ?&gt;
         &lt;/div&gt;&lt;!-- .reply --&gt;
    &lt;/div&gt;&lt;!-- #comment-##  --&gt;

    &lt;?php
              break;
         case 'pingback'  :
         case 'trackback' :
    ?&gt;
    &lt;li class=&quot;post pingback&quot;&gt;
         &lt;p&gt;&lt;?php _e( 'Pingback:', 'twentyten' ); ?&gt; &lt;?php comment_author_link(); ?&gt;&lt;?php edit_comment_link( __('(Edit)', 'twentyten'), ' ' ); ?&gt;&lt;/p&gt;
    &lt;?php
              break;
    endswitch;
}
endif;

/**
* 2つのサイドバーとフッターにあるウィジェットを配置可能な4列を含む、ウィジェット化できる領域を登録します。
*
* 子テーマで twentyten_widgets_init() を上書きするには、アクションフックを取り除き、
* init フックに結び付けられた独自の function を追加してください。
*
* @since Twenty Ten 1.0
* @uses register_sidebar
*/
function twentyten_widgets_init() {
    // エリア1、サイドバーの頭に位置します。
    register_sidebar( array(
         'name' =&gt; __( 'Primary Widget Area', 'twentyten' ),
         'id' =&gt; 'primary-widget-area',
         'description' =&gt; __( 'The primary widget area', 'twentyten' ),
         'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&gt;',
         'after_widget' =&gt; '&lt;/li&gt;',
         'before_title' =&gt; '&lt;h3 class=&quot;widget-title&quot;&gt;',
         'after_title' =&gt; '&lt;/h3&gt;',
    ) );

    // エリア2、サイドバーのウィジェットエリア1の下に位置します。デフォルトでは空です。
    register_sidebar( array(
         'name' =&gt; __( 'Secondary Widget Area', 'twentyten' ),
         'id' =&gt; 'secondary-widget-area',
         'description' =&gt; __( 'The secondary widget area', 'twentyten' ),
         'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&gt;',
         'after_widget' =&gt; '&lt;/li&gt;',
         'before_title' =&gt; '&lt;h3 class=&quot;widget-title&quot;&gt;',
         'after_title' =&gt; '&lt;/h3&gt;',
    ) );

    // エリア3、フッターに位置します。デフォルトでは空です。
    register_sidebar( array(
         'name' =&gt; __( 'First Footer Widget Area', 'twentyten' ),
         'id' =&gt; 'first-footer-widget-area',
         'description' =&gt; __( 'The first footer widget area', 'twentyten' ),
         'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&gt;',
         'after_widget' =&gt; '&lt;/li&gt;',
         'before_title' =&gt; '&lt;h3 class=&quot;widget-title&quot;&gt;',
         'after_title' =&gt; '&lt;/h3&gt;',
    ) );

    // エリア4、フッターに位置します。デフォルトでは空です。
    register_sidebar( array(
         'name' =&gt; __( 'Second Footer Widget Area', 'twentyten' ),
         'id' =&gt; 'second-footer-widget-area',
         'description' =&gt; __( 'The second footer widget area', 'twentyten' ),
         'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&gt;',
         'after_widget' =&gt; '&lt;/li&gt;',
         'before_title' =&gt; '&lt;h3 class=&quot;widget-title&quot;&gt;',
         'after_title' =&gt; '&lt;/h3&gt;',
    ) );

    // エリア5、フッターに位置します。デフォルトでは空です。
    register_sidebar( array(
         'name' =&gt; __( 'Third Footer Widget Area', 'twentyten' ),
         'id' =&gt; 'third-footer-widget-area',
         'description' =&gt; __( 'The third footer widget area', 'twentyten' ),
         'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&gt;',
         'after_widget' =&gt; '&lt;/li&gt;',
         'before_title' =&gt; '&lt;h3 class=&quot;widget-title&quot;&gt;',
         'after_title' =&gt; '&lt;/h3&gt;',
    ) );

    // エリア6、フッターに位置します。デフォルトでは空です。
    register_sidebar( array(
         'name' =&gt; __( 'Fourth Footer Widget Area', 'twentyten' ),
         'id' =&gt; 'fourth-footer-widget-area',
         'description' =&gt; __( 'The fourth footer widget area', 'twentyten' ),
         'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget-container %2$s&quot;&gt;',
         'after_widget' =&gt; '&lt;/li&gt;',
         'before_title' =&gt; '&lt;h3 class=&quot;widget-title&quot;&gt;',
         'after_title' =&gt; '&lt;/h3&gt;',
    ) );
}
/** widgets_init フック上で twentyten_widgets_init() を走らせてサイドバーを登録します。*/
add_action( 'widgets_init', 'twentyten_widgets_init' );

/**
* 最近のコメントウィジェットにパッケージされているデフォルトのスタイルを除去します。
*
* 子テーマでこれを上書きするには、フィルターを除去し、
* widgets_init アクションフックに結びついた独自の function を作成してください。
*
* @since Twenty Ten 1.0
*/
function twentyten_remove_recent_comments_style() {
    global $wp_widget_factory;
    remove_action( 'wp_head', array( $wp_widget_factory-&gt;widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) );
}
add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' );

if ( ! function_exists( 'twentyten_posted_on' ) ) :
/**
* 投稿日時、作成者に関するメタ情報を HTML で印字します。
*
* @since Twenty Ten 1.0
*/
function twentyten_posted_on() {
    printf( __( '&lt;span class=&quot;%1$s&quot;&gt;Posted on&lt;/span&gt; %2$s &lt;span class=&quot;meta-sep&quot;&gt;by&lt;/span&gt; %3$s', 'twentyten' ),
         'meta-prep meta-prep-author',
         sprintf( '&lt;a href=&quot;%1$s&quot; title=&quot;%2$s&quot; rel=&quot;bookmark&quot;&gt;&lt;span class=&quot;entry-date&quot;&gt;%3$s&lt;/span&gt;&lt;/a&gt;',
              get_permalink(),
              esc_attr( get_the_time() ),
              get_the_date()
         ),
         sprintf( '&lt;span class=&quot;author vcard&quot;&gt;&lt;a class=&quot;url fn n&quot; href=&quot;%1$s&quot; title=&quot;%2$s&quot;&gt;%3$s&lt;/a&gt;&lt;/span&gt;',
              get_author_posts_url( get_the_author_meta( 'ID' ) ),
              sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
              get_the_author()
         )
    );
}
endif;

if ( ! function_exists( 'twentyten_posted_in' ) ) :
/**
* 記事（カテゴリー、タグ、パーマリンク）に関する情報を HTML で印字します。
*
* @since Twenty Ten 1.0
*/
function twentyten_posted_in() {
    // 投稿のタグリストをコンマ区切りで取り出します。
    $tag_list = get_the_tag_list( '', ', ' );
    if ( $tag_list ) {
         $posted_in = __( 'This entry was posted in %1$s and tagged %2$s. Bookmark the &lt;a href=&quot;%3$s&quot; title=&quot;Permalink to %4$s&quot; rel=&quot;bookmark&quot;&gt;permalink&lt;/a&gt;.', 'twentyten' );
    } elseif ( is_object_in_taxonomy( get_post_type(), 'category' ) ) {
         $posted_in = __( 'This entry was posted in %1$s. Bookmark the &lt;a href=&quot;%3$s&quot; title=&quot;Permalink to %4$s&quot; rel=&quot;bookmark&quot;&gt;permalink&lt;/a&gt;.', 'twentyten' );
    } else {
         $posted_in = __( 'Bookmark the &lt;a href=&quot;%3$s&quot; title=&quot;Permalink to %4$s&quot; rel=&quot;bookmark&quot;&gt;permalink&lt;/a&gt;.', 'twentyten' );
    }
    // プレースホルダーに取って代わる文字列を印字します。
    printf(
         $posted_in,
         get_the_category_list( ', ' ),
         $tag_list,
         get_permalink(),
         the_title_attribute( 'echo=0' )
    );
}
endif;
[/php]

<h3><a id="tt_header">header.php</a></h3>
[php]
&lt;?php
/**
* テーマのヘッダー。
*
* &lt;head&gt; 部分の全ての要素と、&lt;div id=&quot;main&quot;&gt; までのあらゆるものを表示します。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?&gt;&lt;!DOCTYPE html&gt;
&lt;html &lt;?php language_attributes(); ?&gt;&gt;
&lt;head&gt;
&lt;meta charset=&quot;&lt;?php bloginfo( 'charset' ); ?&gt;&quot; /&gt;
&lt;title&gt;&lt;?php
     /*
      * 見るページに応じて、&lt;title&gt; タグを表示します。
      * wp_title() の出力を少しフィルターしています。詳しくは、
      * functions.php ファイルの twentyten_filter_wp_title() を見てください。
      */
     wp_title( '|', true, 'right' );

     ?&gt;&lt;/title&gt;
&lt;link rel=&quot;profile&quot; href=&quot;http://gmpg.org/xfn/11&quot; /&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;all&quot; href=&quot;&lt;?php bloginfo( 'stylesheet_url' ); ?&gt;&quot; /&gt;
&lt;link rel=&quot;pingback&quot; href=&quot;&lt;?php bloginfo( 'pingback_url' ); ?&gt;&quot; /&gt;
&lt;?php
     /* コメントのスレッド表示が使用できるときには、それをサポートするように
      * コメントフォームのあるページに JavaScript を追加します。
      */
     if ( is_singular() &amp;&amp; get_option( 'thread_comments' ) )
          wp_enqueue_script( 'comment-reply' );

    /* wp_footer() はいつも、テーマの &lt;/body&gt; タグの直後にあります。
     * そうでないと、このフックを使って &lt;head&gt; に
     * スタイルやスクリプトやメタタグを加える
     * 多くのプラグインの動作を止めてしまうでしょう。
     */
     wp_head();
?&gt;
&lt;/head&gt;

&lt;body &lt;?php body_class(); ?&gt;&gt;
&lt;div id=&quot;wrapper&quot; class=&quot;hfeed&quot;&gt;
     &lt;div id=&quot;header&quot;&gt;
          &lt;div id=&quot;masthead&quot;&gt;
               &lt;div id=&quot;branding&quot; role=&quot;banner&quot;&gt;
                    &lt;?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?&gt;
                    &lt;&lt;?php echo $heading_tag; ?&gt; id=&quot;site-title&quot;&gt;
                         &lt;span&gt;
                              &lt;a href=&quot;&lt;?php echo home_url( '/' ); ?&gt;&quot; title=&quot;&lt;?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?&gt;&quot; rel=&quot;home&quot;&gt;&lt;?php bloginfo( 'name' ); ?&gt;&lt;/a&gt;
                         &lt;/span&gt;
                    &lt;/&lt;?php echo $heading_tag; ?&gt;&gt;
                    &lt;div id=&quot;site-description&quot;&gt;&lt;?php bloginfo( 'description' ); ?&gt;&lt;/div&gt;

                    &lt;?php
                         // これが記事か固定ページかどうか、サムネイルがあるか、あるとしたらそれが大きいものか、チェックします。
                         if ( is_singular() &amp;&amp;
                                   has_post_thumbnail( $post-&gt;ID ) &amp;&amp;
                                   ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post-&gt;ID ), 'post-thumbnail' ) ) &amp;&amp;
                                   $image[1] &gt;= HEADER_IMAGE_WIDTH ) :
                              // ヒューストン、我々は新しいヘッダー画像を抱えている！
                              echo get_the_post_thumbnail( $post-&gt;ID, 'post-thumbnail' );
                         else : ?&gt;
                              &lt;img src=&quot;&lt;?php header_image(); ?&gt;&quot; width=&quot;&lt;?php echo HEADER_IMAGE_WIDTH; ?&gt;&quot; height=&quot;&lt;?php echo HEADER_IMAGE_HEIGHT; ?&gt;&quot; alt=&quot;&quot; /&gt;
                         &lt;?php endif; ?&gt;
               &lt;/div&gt;&lt;!-- #branding --&gt;

               &lt;div id=&quot;access&quot; role=&quot;navigation&quot;&gt;
                 &lt;?php /*  スクリーンリーダーやテキストブラウザーがナビゲーションメニューをスキップして、すぐにコンテンツに到達できるようにします。 */ ?&gt;
                    &lt;div class=&quot;skip-link screen-reader-text&quot;&gt;&lt;a href=&quot;#content&quot; title=&quot;&lt;?php esc_attr_e( 'Skip to content', 'twentyten' ); ?&gt;&quot;&gt;&lt;?php _e( 'Skip to content', 'twentyten' ); ?&gt;&lt;/a&gt;&lt;/div&gt;
                    &lt;?php /* ナビゲーションメニューです。メニューが入力されていなければ、wp_nav_menu は wp_page_menu に戻ります。一番の位置に割り付けられたメニューが使われます。何も割り付けられていなければ、最も低い ID のメニューが使われます。  */ ?&gt;
                    &lt;?php wp_nav_menu( array( 'container_class' =&gt; 'menu-header', 'theme_location' =&gt; 'primary' ) ); ?&gt;
               &lt;/div&gt;&lt;!-- #access --&gt;
          &lt;/div&gt;&lt;!-- #masthead --&gt;
     &lt;/div&gt;&lt;!-- #header --&gt;

     &lt;div id=&quot;main&quot;&gt;
[/php]

<h3><a id="tt_index">index.php</a></h3>
[php]
&lt;?php
/**
* メインテンプレートファイル。
*
* これは WordPress テーマで最も一般的なテンプレートファイルで、
* テーマに必要な2つのファイルのうちのひとつです（もうひとつのファイルは style.css になります）。
* 問合せに一致するものが特にないときにページを表示するのに使用されます。
* 例えば、home.php ファイルが存在しないときには、ホームページとなります。
* 詳しくは： http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E9%9A%8E%E5%B1%A4
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?&gt;

          &lt;div id=&quot;container&quot;&gt;
               &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

               &lt;?php
               /* 記事を出力するループを走らせます。
                * もし、子テーマでこれを上書きするなら、
                * loop-index.php ファイルを含めると、そのファイルが代わりに使われます。
                */
                get_template_part( 'loop', 'index' );
               ?&gt;
               &lt;/div&gt;&lt;!-- #content --&gt;
          &lt;/div&gt;&lt;!-- #container --&gt;

&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
[/php]

<h3><a id="tt_license">license.txt</a></h3>
<p><a href="http://www.gnu.org/licenses/licenses.ja.html#Translations" target="_blank">GPL プログラムの頒布条件として指定されているのはオリジナルである英語</a>なので、翻訳したものじゃいかんということなのですが、理解を深めたい場合は<a href="http://www.opensource.jp/gpl/gpl.ja.html" target="_blank">非公式の日本語版</a>を先人が作ってくださっていますので、こちらをご覧ください。</p>

<h3><a id="tt_loop">loop.php</a></h3>
[php]
&lt;?php
/**
* 記事を表示するループ。
*
* ループは、記事とその内容を表示します。
* ループについては http://wpdocs.sourceforge.jp/The_Loop
* タグについては
* http://wpdocs.sourceforge.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E3%82%BF%E3%82%B0
* をご覧ください。
*
* これは、loop.php または loop-template.php で上書きすることができ、
* 'template' の部分は、テンプレートからリクエストされる
* ループ内容になります。たとえば、loop-index.php は、
* そのファイルが存在していて、&lt;code&gt;get_template_part( 'loop', 'index' );&lt;/code&gt;
* のコードで呼び出されるときに使われます。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?&gt;

&lt;?php /* 利用できるときに、次の／前のページへのナビゲージョンを表示します。 */ ?&gt;
&lt;?php if ( $wp_query-&gt;max_num_pages &gt; 1 ) : ?&gt;
     &lt;div id=&quot;nav-above&quot; class=&quot;navigation&quot;&gt;
          &lt;div class=&quot;nav-previous&quot;&gt;&lt;?php next_posts_link( __( '&lt;span class=&quot;meta-nav&quot;&gt;&amp;larr;&lt;/span&gt; Older posts', 'twentyten' ) ); ?&gt;&lt;/div&gt;
          &lt;div class=&quot;nav-next&quot;&gt;&lt;?php previous_posts_link( __( 'Newer posts &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ) ); ?&gt;&lt;/div&gt;
     &lt;/div&gt;&lt;!-- #nav-above --&gt;
&lt;?php endif; ?&gt;

&lt;?php /* 表示できる記事がなければ、空のアーカイブページを表示します。e */ ?&gt;
&lt;?php if ( ! have_posts() ) : ?&gt;
     &lt;div id=&quot;post-0&quot; class=&quot;post error404 not-found&quot;&gt;
          &lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php _e( 'Not Found', 'twentyten' ); ?&gt;&lt;/h1&gt;
          &lt;div class=&quot;entry-content&quot;&gt;
               &lt;p&gt;&lt;?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?&gt;&lt;/p&gt;
               &lt;?php get_search_form(); ?&gt;
          &lt;/div&gt;&lt;!-- .entry-content --&gt;
     &lt;/div&gt;&lt;!-- #post-0 --&gt;
&lt;?php endif; ?&gt;

&lt;?php
     /* ループを開始します。
      *
      * Twenty Ten では、複数の状況で同じループを使います。
      * 3つの主要部分に分かれていて:ギャラリー分類で
      * 記事を表示する時、脇の分類で記事を表示する時、
      * そしてその他のすべての記事を表示する時です。
      *
      * 加えて、アーカイブページにいるのか、検索ページにいるのか
      * などなどを確認します。そうして、ささいな違いはありながらも、
      * 共有されているループの残りを複製してしまうことなく、
      * それぞれのテンプレートで使っています。
      *
      * これ以上の面倒なしにして、それではループです。:
      */ ?&gt;
&lt;?php while ( have_posts() ) : the_post(); ?&gt;

&lt;?php /* ギャラリー分類で記事を表示する方法 */ ?&gt;

     &lt;?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?&gt;
          &lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;
               &lt;h2 class=&quot;entry-title&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; title=&quot;&lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&gt;&quot; rel=&quot;bookmark&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;

               &lt;div class=&quot;entry-meta&quot;&gt;
                    &lt;?php twentyten_posted_on(); ?&gt;
               &lt;/div&gt;&lt;!-- .entry-meta --&gt;

               &lt;div class=&quot;entry-content&quot;&gt;
&lt;?php if ( post_password_required() ) : ?&gt;
                    &lt;?php the_content(); ?&gt;
&lt;?php else : ?&gt;
                    &lt;div class=&quot;gallery-thumb&quot;&gt;
&lt;?php
     $images = get_children( array( 'post_parent' =&gt; $post-&gt;ID, 'post_type' =&gt; 'attachment', 'post_mime_type' =&gt; 'image', 'orderby' =&gt; 'menu_order', 'order' =&gt; 'ASC', 'numberposts' =&gt; 999 ) );
     $total_images = count( $images );
     $image = array_shift( $images );
     $image_img_tag = wp_get_attachment_image( $image-&gt;ID, 'thumbnail' );
?&gt;
                         &lt;a class=&quot;size-thumbnail&quot; href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php echo $image_img_tag; ?&gt;&lt;/a&gt;
                    &lt;/div&gt;&lt;!-- .gallery-thumb --&gt;
                    &lt;p&gt;&lt;em&gt;&lt;?php printf( __( 'This gallery contains &lt;a %1$s&gt;%2$s photos&lt;/a&gt;.', 'twentyten' ),
                              'href=&quot;' . get_permalink() . '&quot; title=&quot;' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '&quot; rel=&quot;bookmark&quot;',
                              $total_images
                         ); ?&gt;&lt;/em&gt;&lt;/p&gt;

                    &lt;?php the_excerpt(); ?&gt;
&lt;?php endif; ?&gt;
               &lt;/div&gt;&lt;!-- .entry-content --&gt;

               &lt;div class=&quot;entry-utility&quot;&gt;
                    &lt;a href=&quot;&lt;?php echo get_term_link( _x('gallery', 'gallery category slug', 'twentyten'), 'category' ); ?&gt;&quot; title=&quot;&lt;?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?&gt;&quot;&gt;&lt;?php _e( 'More Galleries', 'twentyten' ); ?&gt;&lt;/a&gt;
                    &lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt;
                    &lt;span class=&quot;comments-link&quot;&gt;&lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&gt;&lt;/span&gt;
                    &lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;
               &lt;/div&gt;&lt;!-- .entry-utility --&gt;
          &lt;/div&gt;&lt;!-- #post-## --&gt;

&lt;?php /* 脇の分類で記事を表示する方法 */ ?&gt;

     &lt;?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?&gt;
          &lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;

          &lt;?php if ( is_archive() || is_search() ) : // アーカイブと検索の抜粋を表示します。 ?&gt;
               &lt;div class=&quot;entry-summary&quot;&gt;
                    &lt;?php the_excerpt(); ?&gt;
               &lt;/div&gt;&lt;!-- .entry-summary --&gt;
          &lt;?php else : ?&gt;
               &lt;div class=&quot;entry-content&quot;&gt;
                    &lt;?php the_content( __( 'Continue reading &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ) ); ?&gt;
               &lt;/div&gt;&lt;!-- .entry-content --&gt;
          &lt;?php endif; ?&gt;

               &lt;div class=&quot;entry-utility&quot;&gt;
                    &lt;?php twentyten_posted_on(); ?&gt;
                    &lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt;
                    &lt;span class=&quot;comments-link&quot;&gt;&lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&gt;&lt;/span&gt;
                    &lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;
               &lt;/div&gt;&lt;!-- .entry-utility --&gt;
          &lt;/div&gt;&lt;!-- #post-## --&gt;

&lt;?php /* その他のすべての記事を表示する方法 */ ?&gt;

     &lt;?php else : ?&gt;
          &lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;
               &lt;h2 class=&quot;entry-title&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; title=&quot;&lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&gt;&quot; rel=&quot;bookmark&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;

               &lt;div class=&quot;entry-meta&quot;&gt;
                    &lt;?php twentyten_posted_on(); ?&gt;
               &lt;/div&gt;&lt;!-- .entry-meta --&gt;

     &lt;?php if ( is_archive() || is_search() ) : // アーカイブと検索のみ抜粋を表示します。 ?&gt;
               &lt;div class=&quot;entry-summary&quot;&gt;
                    &lt;?php the_excerpt(); ?&gt;
               &lt;/div&gt;&lt;!-- .entry-summary --&gt;
     &lt;?php else : ?&gt;
               &lt;div class=&quot;entry-content&quot;&gt;
                    &lt;?php the_content( __( 'Continue reading &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ) ); ?&gt;
                    &lt;?php wp_link_pages( array( 'before' =&gt; '&lt;div class=&quot;page-link&quot;&gt;' . __( 'Pages:', 'twentyten' ), 'after' =&gt; '&lt;/div&gt;' ) ); ?&gt;
               &lt;/div&gt;&lt;!-- .entry-content --&gt;
     &lt;?php endif; ?&gt;

               &lt;div class=&quot;entry-utility&quot;&gt;
                    &lt;?php if ( count( get_the_category() ) ) : ?&gt;
                         &lt;span class=&quot;cat-links&quot;&gt;
                              &lt;?php printf( __( '&lt;span class=&quot;%1$s&quot;&gt;Posted in&lt;/span&gt; %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?&gt;
                         &lt;/span&gt;
                         &lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt;
                    &lt;?php endif; ?&gt;
                    &lt;?php
                         $tags_list = get_the_tag_list( '', ', ' );
                         if ( $tags_list ):
                    ?&gt;
                         &lt;span class=&quot;tag-links&quot;&gt;
                              &lt;?php printf( __( '&lt;span class=&quot;%1$s&quot;&gt;Tagged&lt;/span&gt; %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?&gt;
                         &lt;/span&gt;
                         &lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt;
                    &lt;?php endif; ?&gt;
                    &lt;span class=&quot;comments-link&quot;&gt;&lt;?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?&gt;&lt;/span&gt;
                    &lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;
               &lt;/div&gt;&lt;!-- .entry-utility --&gt;
          &lt;/div&gt;&lt;!-- #post-## --&gt;

          &lt;?php comments_template( '', true ); ?&gt;

     &lt;?php endif; // これは、ループをカテゴリーに応じて3つの部分に分ける if 宣言でした。 ?&gt;

&lt;?php endwhile; // End the loop. Whew. ?&gt;

&lt;?php /* 利用できるときに、次の／前のページへのナビゲージョンを表示します。 */ ?&gt;
&lt;?php if (  $wp_query-&gt;max_num_pages &gt; 1 ) : ?&gt;
                    &lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&gt;
                         &lt;div class=&quot;nav-previous&quot;&gt;&lt;?php next_posts_link( __( '&lt;span class=&quot;meta-nav&quot;&gt;&amp;larr;&lt;/span&gt; Older posts', 'twentyten' ) ); ?&gt;&lt;/div&gt;
                         &lt;div class=&quot;nav-next&quot;&gt;&lt;?php previous_posts_link( __( 'Newer posts &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ) ); ?&gt;&lt;/div&gt;
                    &lt;/div&gt;&lt;!-- #nav-below --&gt;
&lt;?php endif; ?&gt;
[/php]

<h3><a id="tt_onecolumn-page">onecolumn-page.php</a></h3>
[php]
&lt;?php
/**
* Template Name: 1列、サイドバーなし
*
* サイドバーなしのカスタムページテンプレート。
*
* 上記の&quot;テンプレート名:&quot;の部分はページ編集画面の
* ドロップダウンメニューで選択できます。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?&gt;

          &lt;div id=&quot;container&quot; class=&quot;one-column&quot;&gt;
               &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

&lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&gt;

                    &lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;
                         &lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;
                         &lt;div class=&quot;entry-content&quot;&gt;
                              &lt;?php the_content(); ?&gt;
                              &lt;?php wp_link_pages( array( 'before' =&gt; '&lt;div class=&quot;page-link&quot;&gt;' . __( 'Pages:', 'twentyten' ), 'after' =&gt; '&lt;/div&gt;' ) ); ?&gt;
                              &lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;
                         &lt;/div&gt;&lt;!-- .entry-content --&gt;
                    &lt;/div&gt;&lt;!-- #post-## --&gt;

                    &lt;?php comments_template( '', true ); ?&gt;

&lt;?php endwhile; ?&gt;

               &lt;/div&gt;&lt;!-- #content --&gt;
          &lt;/div&gt;&lt;!-- #container --&gt;

&lt;?php get_footer(); ?&gt;
[/php]

<h3><a id="tt_page">page.php</a></h3>
[php]
&lt;?php
/**
* すべての固定ページを表示するためのテンプレート。
*
* これは、デフォルトですべての固定ページを表示するテンプレートです。
* これが WordPress の固定ページの構成であることと、
* お持ちの WordPress サイトの他の '固定ページ' は
* 別のテンプレートを使う、ということに注意してください。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?&gt;

          &lt;div id=&quot;container&quot;&gt;
               &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

&lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&gt;

                    &lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;
                         &lt;?php if ( is_front_page() ) { ?&gt;
                              &lt;h2 class=&quot;entry-title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
                         &lt;?php } else { ?&gt;     
                              &lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;
                         &lt;?php } ?&gt;                    

                         &lt;div class=&quot;entry-content&quot;&gt;
                              &lt;?php the_content(); ?&gt;
                              &lt;?php wp_link_pages( array( 'before' =&gt; '&lt;div class=&quot;page-link&quot;&gt;' . __( 'Pages:', 'twentyten' ), 'after' =&gt; '&lt;/div&gt;' ) ); ?&gt;
                              &lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;
                         &lt;/div&gt;&lt;!-- .entry-content --&gt;
                    &lt;/div&gt;&lt;!-- #post-## --&gt;

                    &lt;?php comments_template( '', true ); ?&gt;

&lt;?php endwhile; ?&gt;

               &lt;/div&gt;&lt;!-- #content --&gt;
          &lt;/div&gt;&lt;!-- #container --&gt;

&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
[/php]

<h3><a id="tt_rtl">rtl.css</a></h3>
[css]
/*
Theme Name: Twenty Ten
*/


/*
RTL 基礎（訳注：RTL=アラビア語やヘブライ語のように右から左へと書く言語）
*/


body {
     direction:rtl;
     unicode-bidi:embed;
}


/*
レイアウト: 2列 (右)
説明: コンテンツの右にひとつのサイドバーがある2列固定レイアウト
*/

#container {
     float: right;
     margin: 0 0 0 -240px;
}
#content {
     margin: 0 20px 36px 280px;
}
#primary,
#secondary {
     float: left;
}
#secondary {
     clear: left;
}


/* =フォント
-------------------------------------------------------------- */
body,
input,
textarea,
.page-title span,
.pingback a.url,
h3#comments-title,
h3#reply-title,
#access .menu,
#access div.menu ul,
#cancel-comment-reply-link,
.form-allowed-tags,
#site-info,
#site-title,
#wp-calendar,
.comment-meta,
.comment-body tr th,
.comment-body thead th,
.entry-content label,
.entry-content tr th,
.entry-content thead th,
.entry-meta,
.entry-title,
.entry-utility,
#respond label,
.navigation,
.page-title,
.pingback p,
.reply,
.widget-title,
input[type=submit] {
     font-family: Arial, Tahoma, sans-serif;
}

/* =構造
-------------------------------------------------------------- */

/* メインテーマ構造 */
#footer-widget-area .widget-area {
     float: right;
     margin-left: 20px;
     margin-right: 0;
}
#footer-widget-area #fourth {
     margin-left: 0;
}
#site-info {
     float: right;
}
#site-generator {
     float: left;
}


/* =グローバル要素
-------------------------------------------------------------- */

/* テキスト要素 */
ul {
     margin: 0 1.5em 18px 0;
}
blockquote {
     font-style: normal;
}

/* スクリーンリーダーのみに向けたテキスト */
.screen-reader-text {
     left: auto;
     text-indent:-9000px;
     overflow:hidden;
}


/* =ヘッダー
-------------------------------------------------------------- */

#site-title {
     float: right;
}
#site-description {
     clear: left;
     float: left;
     font-style: normal;
}

/* =メニュー
-------------------------------------------------------------- */

#access {
     float:right;
}

#access .menu-header,
div.menu {
   margin-right: 12px;
   margin-left: 0;
}

#access .menu-header li,
div.menu li{
     float:right;
}

#access ul ul {
     left:auto;
     right:0;
     float:right;
}
#access ul ul ul {
     left:auto;
     right:100%;
}

/* =コンテンツ
-------------------------------------------------------------- */

#content table {
     text-align: right;
     margin: 0 0 24px -1px;
}
.page-title span {
     font-style:normal;
}
.entry-title,
.entry-meta {
     clear: right;
     float: right;
     margin-left: 68px;
     margin-right: 0;
}

.entry-content input.file,
.entry-content input.button {
     margin-left: 24px;
     margin-right:0;
}
.entry-content blockquote.left {
     float: right;
     margin-right: 0;
     margin-left: 24px;
     text-align: left;
}
.entry-content blockquote.right {
     float: left;
     margin-right: 24px;
     margin-left: 0;
     text-align: right;
}
#entry-author-info #author-avatar {
     float: right;
     margin: 0 0 0 -104px;
}
#entry-author-info #author-description {
     float: right;
     margin: 0 104px 0 0;
}

/* ギャラリーの並べ方
-------------------------------------------------------------- */

.category-gallery .gallery-thumb {
     float: right;
     margin-left:20px;
     margin-right:0;
}


/* 画像
-------------------------------------------------------------- */

#content .gallery .gallery-caption {
     margin-right: 0;
}

#content .gallery .gallery-item {
     float: right;
}

/* =ナビゲーション
-------------------------------------------------------------- */
.nav-previous {
     float: right;
}
.nav-next {
     float: left;
     text-align:left;
}

/* =コメント
-------------------------------------------------------------- */

.commentlist li.comment {
     padding: 0 56px 0 0;
}
.commentlist .avatar {
     right: 0;
     left: auto;
}
.comment-author .says, #comments .pingback .url  {
     font-style: normal;
}

/* コメントフォーム */
.children #respond {
     margin: 0 0 0 48px;
}

/* =ウィジェット領域
-------------------------------------------------------------- */

.widget-area ul {
     margin-right: 0;
}
.widget-area ul ul {
     margin-right: 1.3em;
     margin-left: 0;
}
#wp-calendar caption {
     text-align: right;
}
#wp-calendar tfoot #next {
     text-align: left;
}

/* メインサイドバー */
#main .widget-area ul {
     margin-right: 0;
     padding: 0 0 0 20px;
}
#main .widget-area ul ul {
     margin-right: 1.3em;
     margin-left: 0;
}

/* =フッター
-------------------------------------------------------------- */
#site-generator {
     font-style:normal;
}
#site-generator a {
     background-position: right center;
     padding-right: 20px;
     padding-left: 0;
}
[/css]

<h3><a id="tt_search">search.php</a></h3>
[php]
&lt;?php
/**
* 検索結果ページを表示するためのテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?&gt;

         &lt;div id=&quot;container&quot;&gt;
              &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

&lt;?php if ( have_posts() ) : ?&gt;
                   &lt;h1 class=&quot;page-title&quot;&gt;&lt;?php printf( __( 'Search Results for: %s', 'twentyten' ), '&lt;span&gt;' . get_search_query() . '&lt;/span&gt;' ); ?&gt;&lt;/h1&gt;
                   &lt;?php
                   /* 検索結果を出力するためにループを走らせます。
                    * 子テーマでこれを上書きしたい場合は、
                    * loop-search.php ファイルを含めると、そのファイルが代わりに使われます。
                    */
                    get_template_part( 'loop', 'search' );
                   ?&gt;
&lt;?php else : ?&gt;
                   &lt;div id=&quot;post-0&quot; class=&quot;post no-results not-found&quot;&gt;
                        &lt;h2 class=&quot;entry-title&quot;&gt;&lt;?php _e( 'Nothing Found', 'twentyten' ); ?&gt;&lt;/h2&gt;
                        &lt;div class=&quot;entry-content&quot;&gt;
                             &lt;p&gt;&lt;?php _e( 'Sorry, but nothing matched your search criteria. Please try again with some different keywords.', 'twentyten' ); ?&gt;&lt;/p&gt;
                             &lt;?php get_search_form(); ?&gt;
                        &lt;/div&gt;&lt;!-- .entry-content --&gt;
                   &lt;/div&gt;&lt;!-- #post-0 --&gt;
&lt;?php endif; ?&gt;
              &lt;/div&gt;&lt;!-- #content --&gt;
         &lt;/div&gt;&lt;!-- #container --&gt;

&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
[/php]

<h3><a id="tt_sidebar">sidebar.php</a></h3>
[php]
&lt;?php
/**
* 第一、第二のウィジェット領域を含むサイドバー。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?&gt;

         &lt;div id=&quot;primary&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&gt;
              &lt;ul class=&quot;xoxo&quot;&gt;

&lt;?php
    /* dynamic_sidebar() function を呼びだすと、ウィジェット領域に
     * ウェジェットを吐き出します。 代わりに false を返すと、
     * サイドバーは存在せず、 万が一のために
     * デフォルトのサイドバーをハードコードします。
     */
    if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?&gt;
   
              &lt;li id=&quot;search&quot; class=&quot;widget-container widget_search&quot;&gt;
                   &lt;?php get_search_form(); ?&gt;
              &lt;/li&gt;

              &lt;li id=&quot;archives&quot; class=&quot;widget-container&quot;&gt;
                   &lt;h3 class=&quot;widget-title&quot;&gt;&lt;?php _e( 'Archives', 'twentyten' ); ?&gt;&lt;/h3&gt;
                   &lt;ul&gt;
                        &lt;?php wp_get_archives( 'type=monthly' ); ?&gt;
                   &lt;/ul&gt;
              &lt;/li&gt;

              &lt;li id=&quot;meta&quot; class=&quot;widget-container&quot;&gt;
                   &lt;h3 class=&quot;widget-title&quot;&gt;&lt;?php _e( 'Meta', 'twentyten' ); ?&gt;&lt;/h3&gt;
                   &lt;ul&gt;
                        &lt;?php wp_register(); ?&gt;
                        &lt;li&gt;&lt;?php wp_loginout(); ?&gt;&lt;/li&gt;
                        &lt;?php wp_meta(); ?&gt;
                   &lt;/ul&gt;
              &lt;/li&gt;

         &lt;?php endif; // ウィジェットエリア1の終わり ?&gt;
              &lt;/ul&gt;
         &lt;/div&gt;&lt;!-- #primary .widget-area --&gt;

&lt;?php
    // ウィジェット用の第二のサイドバー。
    if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?&gt;

         &lt;div id=&quot;secondary&quot; class=&quot;widget-area&quot; role=&quot;complementary&quot;&gt;
              &lt;ul class=&quot;xoxo&quot;&gt;
                   &lt;?php dynamic_sidebar( 'secondary-widget-area' ); ?&gt;
              &lt;/ul&gt;
         &lt;/div&gt;&lt;!-- #secondary .widget-area --&gt;

&lt;?php endif; ?&gt;
[/php]

<h3><a id="tt_sidebar-footer">sidebar-footer.php</a></h3>
[php]
&lt;?php
/**
* フッターウィジェット領域。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/
?&gt;

&lt;?php
    /* フッターウィジェット領域は、その領域のいずれかに
     * ウィジェットがあると動作します。最初にこのことを確認しましょう。
     *
     * サイドバーのいずれにもウィジェットがなければ、諦めましょう。
     */
    if (   ! is_active_sidebar( 'first-footer-widget-area'  )
         &amp;&amp; ! is_active_sidebar( 'second-footer-widget-area' )
         &amp;&amp; ! is_active_sidebar( 'third-footer-widget-area'  )
         &amp;&amp; ! is_active_sidebar( 'fourth-footer-widget-area' )
    )
         return;
    // これに成功すれば、ウィジェットがあります。こうしましょう。
?&gt;

              &lt;div id=&quot;footer-widget-area&quot; role=&quot;complementary&quot;&gt;

&lt;?php if ( is_active_sidebar( 'first-footer-widget-area' ) ) : ?&gt;
                   &lt;div id=&quot;first&quot; class=&quot;widget-area&quot;&gt;
                        &lt;ul class=&quot;xoxo&quot;&gt;
                             &lt;?php dynamic_sidebar( 'first-footer-widget-area' ); ?&gt;
                        &lt;/ul&gt;
                   &lt;/div&gt;&lt;!-- #first .widget-area --&gt;
&lt;?php endif; ?&gt;

&lt;?php if ( is_active_sidebar( 'second-footer-widget-area' ) ) : ?&gt;
                   &lt;div id=&quot;second&quot; class=&quot;widget-area&quot;&gt;
                        &lt;ul class=&quot;xoxo&quot;&gt;
                             &lt;?php dynamic_sidebar( 'second-footer-widget-area' ); ?&gt;
                        &lt;/ul&gt;
                   &lt;/div&gt;&lt;!-- #second .widget-area --&gt;
&lt;?php endif; ?&gt;

&lt;?php if ( is_active_sidebar( 'third-footer-widget-area' ) ) : ?&gt;
                   &lt;div id=&quot;third&quot; class=&quot;widget-area&quot;&gt;
                        &lt;ul class=&quot;xoxo&quot;&gt;
                             &lt;?php dynamic_sidebar( 'third-footer-widget-area' ); ?&gt;
                        &lt;/ul&gt;
                   &lt;/div&gt;&lt;!-- #third .widget-area --&gt;
&lt;?php endif; ?&gt;

&lt;?php if ( is_active_sidebar( 'fourth-footer-widget-area' ) ) : ?&gt;
                   &lt;div id=&quot;fourth&quot; class=&quot;widget-area&quot;&gt;
                        &lt;ul class=&quot;xoxo&quot;&gt;
                             &lt;?php dynamic_sidebar( 'fourth-footer-widget-area' ); ?&gt;
                        &lt;/ul&gt;
                   &lt;/div&gt;&lt;!-- #fourth .widget-area --&gt;
&lt;?php endif; ?&gt;

              &lt;/div&gt;&lt;!-- #footer-widget-area --&gt; 
[/php]

<h3><a id="tt_single">single.php</a></h3>
[php]
&lt;?php
/**
* すべての記事を表示するためのテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?&gt;

         &lt;div id=&quot;container&quot;&gt;
              &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

&lt;?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?&gt;

                   &lt;div id=&quot;nav-above&quot; class=&quot;navigation&quot;&gt;
                        &lt;div class=&quot;nav-previous&quot;&gt;&lt;?php previous_post_link( '%link', '&lt;span class=&quot;meta-nav&quot;&gt;' . _x( '&amp;larr;', 'Previous post link', 'twentyten' ) . '&lt;/span&gt; %title' ); ?&gt;&lt;/div&gt;
                        &lt;div class=&quot;nav-next&quot;&gt;&lt;?php next_post_link( '%link', '%title &lt;span class=&quot;meta-nav&quot;&gt;' . _x( '&amp;rarr;', 'Next post link', 'twentyten' ) . '&lt;/span&gt;' ); ?&gt;&lt;/div&gt;
                   &lt;/div&gt;&lt;!-- #nav-above --&gt;

                   &lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;
                        &lt;h1 class=&quot;entry-title&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;

                        &lt;div class=&quot;entry-meta&quot;&gt;
                             &lt;?php twentyten_posted_on(); ?&gt;
                        &lt;/div&gt;&lt;!-- .entry-meta --&gt;

                        &lt;div class=&quot;entry-content&quot;&gt;
                             &lt;?php the_content(); ?&gt;
                             &lt;?php wp_link_pages( array( 'before' =&gt; '&lt;div class=&quot;page-link&quot;&gt;' . __( 'Pages:', 'twentyten' ), 'after' =&gt; '&lt;/div&gt;' ) ); ?&gt;
                        &lt;/div&gt;&lt;!-- .entry-content --&gt;

&lt;?php if ( get_the_author_meta( 'description' ) ) : // ユーザが説明を記入している場合は、略歴を表示します。 ?&gt;
                        &lt;div id=&quot;entry-author-info&quot;&gt;
                             &lt;div id=&quot;author-avatar&quot;&gt;
                                  &lt;?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?&gt;
                             &lt;/div&gt;&lt;!-- #author-avatar --&gt;
                             &lt;div id=&quot;author-description&quot;&gt;
                                  &lt;h2&gt;&lt;?php printf( esc_attr__( 'About %s', 'twentyten' ), get_the_author() ); ?&gt;&lt;/h2&gt;
                                  &lt;?php the_author_meta( 'description' ); ?&gt;
                                  &lt;div id=&quot;author-link&quot;&gt;
                                       &lt;a href=&quot;&lt;?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?&gt;&quot;&gt;
                                            &lt;?php printf( __( 'View all posts by %s &lt;span class=&quot;meta-nav&quot;&gt;&amp;rarr;&lt;/span&gt;', 'twentyten' ), get_the_author() ); ?&gt;
                                       &lt;/a&gt;
                                  &lt;/div&gt;&lt;!-- #author-link     --&gt;
                             &lt;/div&gt;&lt;!-- #author-description --&gt;
                        &lt;/div&gt;&lt;!-- #entry-author-info --&gt;
&lt;?php endif; ?&gt;

                        &lt;div class=&quot;entry-utility&quot;&gt;
                             &lt;?php twentyten_posted_in(); ?&gt;
                             &lt;?php edit_post_link( __( 'Edit', 'twentyten' ), '&lt;span class=&quot;edit-link&quot;&gt;', '&lt;/span&gt;' ); ?&gt;
                        &lt;/div&gt;&lt;!-- .entry-utility --&gt;
                   &lt;/div&gt;&lt;!-- #post-## --&gt;

                   &lt;div id=&quot;nav-below&quot; class=&quot;navigation&quot;&gt;
                        &lt;div class=&quot;nav-previous&quot;&gt;&lt;?php previous_post_link( '%link', '&lt;span class=&quot;meta-nav&quot;&gt;' . _x( '&amp;larr;', 'Previous post link', 'twentyten' ) . '&lt;/span&gt; %title' ); ?&gt;&lt;/div&gt;
                        &lt;div class=&quot;nav-next&quot;&gt;&lt;?php next_post_link( '%link', '%title &lt;span class=&quot;meta-nav&quot;&gt;' . _x( '&amp;rarr;', 'Next post link', 'twentyten' ) . '&lt;/span&gt;' ); ?&gt;&lt;/div&gt;
                   &lt;/div&gt;&lt;!-- #nav-below --&gt;

                   &lt;?php comments_template( '', true ); ?&gt;

&lt;?php endwhile; // ループの終わり ?&gt;

              &lt;/div&gt;&lt;!-- #content --&gt;
         &lt;/div&gt;&lt;!-- #container --&gt;

&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
[/php]

<h3><a id="tt_style">style.css</a></h3>
[css]
@charset &quot;utf-8&quot;;
/*
Theme Name: Twenty Ten
Theme URI: http://wordpress.org/
Description: WordPress のデフォルトテーマ、2010。
Author: the WordPress team
Version: 1.0
Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style
*/


/* ブラウザーの持つデフォルトの CSS をリセットします。Eric Meyer による作業に基づきます: http://meyerweb.com/eric/tools/css/reset/index.html
-------------------------------------------------------------- */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
   margin: 0;
   padding: 0;
   border: 0;
   vertical-align: baseline;
   background: transparent;
}
body {
   line-height: 1;
}
h1, h2, h3, h4, h5, h6 {
   font-weight: normal;
   clear: both;
}
ol, ul {
   list-style: none;
}
blockquote {
   quotes: none;
}
blockquote:before, blockquote:after {
   content: '';
   content: none;
}
del {
   text-decoration: line-through;
}
/* テーブルはまだ、マークアップに 'cellspacing=&quot;0&quot;' を必要とします。 */
table {
   border-collapse: collapse;
   border-spacing: 0;
}
a img { border: none; }



/*
レイアウト: 2列
説明: コンテンツの右にサイドバーのある2列固定レイアウト
*/

#container {
   float: left;
   margin: 0 -240px 0 0;
   width: 100%;
}
#content {
   margin: 0 280px 0 20px;
}
#primary,
#secondary {
   float: right;
   overflow: hidden;
   width: 220px;
}
#secondary {
   clear: right;
}
#footer {
   clear: both;
   width: 100%;
}

/*
レイアウト: 1列でサイドバーなし
説明: サイドバーなしの中央1列
*/

.one-column #content {
   margin: 0 auto;
   width: 640px;
}

/*
レイアウト: 長さ目一杯で、サイドバーなし
説明: サイドバーなしの長さ目一杯のコンテンツ; 添付ファイルのページに使用されます。
*/

.single-attachment #content {
   margin: 0 auto;
   width: 900px;
}


/* =フォント
-------------------------------------------------------------- */
body,
input,
textarea,
.page-title span,
.pingback a.url {
   font-family: Georgia, &quot;Bitstream Charter&quot;, serif;
}

h3#comments-title,
h3#reply-title,
#access .menu,
#access div.menu ul,
#cancel-comment-reply-link,
.form-allowed-tags,
#site-info,
#site-title,
#wp-calendar,
.comment-meta,
.comment-body tr th,
.comment-body thead th,
.entry-content label,
.entry-content tr th,
.entry-content thead th,
.entry-meta,
.entry-title,
.entry-utility,
#respond label,
.navigation,
.page-title,
.pingback p,
.reply,
.widget-title,
.wp-caption-text,
input[type=submit]
{
   font-family: &quot;Helvetica Neue&quot;, Arial, Helvetica, &quot;Nimbus Sans L&quot;, sans-serif;
}
pre {
   font-family: &quot;Courier 10 Pitch&quot;, Courier, monospace;
}
code {
   font-family: Monaco, Consolas, &quot;Andale Mono&quot;, &quot;DejaVu Sans Mono&quot;, monospace;
}



/* =構造
-------------------------------------------------------------- */

/* メインのテーマ構造 */
#access .menu-header,
div.menu,
#colophon,
#branding,
#main,
#wrapper {
   margin: 0 auto;
   width: 940px;
}
#wrapper {
   margin-top: 20px;
   background: #fff;
   padding: 0 20px;
}

/* フッター領域の構造 */
#footer-widget-area {
   overflow: hidden;
}
#footer-widget-area .widget-area {
   float: left;
   margin-right: 20px;
   width: 220px;
}
#footer-widget-area #fourth {
   margin-right: 0;
}
#site-info {
   float: left;
   width: 700px;
   font-weight: bold;
   font-size: 14px;
}
#site-generator {
   float: right;
   width: 220px;
}



/* =グローバル要素
-------------------------------------------------------------- */

/* メインのグローバル 'テーマ' とフォントスタイル  */
body {
   background: #f1f1f1;
}

body,
input,
textarea {
   color: #666;
   font-size: 12px;
   line-height: 18px;
}
hr {
   background-color: #E7E7E7;
   border:0;
   height: 1px;
   margin-bottom: 18px;
   clear:both;
}

/* テキスト要素 */
p {
   margin-bottom: 18px;
}
ul {
   list-style: square;
   margin: 0 0 18px 1.5em;
}
ol {
   list-style: decimal;
   margin: 0 0 18px 1.5em;
}
ol ol {
   list-style:upper-alpha;
}
ol ol ol {
   list-style:lower-roman;
}
ol ol ol ol {
   list-style:lower-alpha;
}
ul ul,
ol ol,
ul ol,
ol ul {
   margin-bottom:0;
}
dl {
   margin:0 0 24px 0;
}
dt {
   font-weight: bold;
}
dd {
   margin-bottom: 18px;
}
strong {
   font-weight: bold;
}
cite,
em,
i {
   font-style: italic;
}
big {
   font-size: 131.25%;
}
ins {
   background: #ffc;
   text-decoration: none;
}
blockquote {
   font-style: italic;
   padding: 0 3em;
}
blockquote cite,
blockquote em,
blockquote i {
   font-style: normal;
}
pre {
   background: #f7f7f7;
   color: #222;
   line-height: 18px;
   margin-bottom: 18px;
   padding: 1.5em;
}
abbr,
acronym {
   border-bottom: 1px dotted #666;
   cursor: help;
}

sup,
sub {
   height: 0;
   line-height: 1;
   vertical-align: baseline;
   position: relative;
}
sup {
   bottom: 1ex;
}
sub {
   top: .5ex;
}
input[type=&quot;text&quot;],
textarea {
   padding: 2px;
   background: #f9f9f9;
   border: 1px solid #ccc;
   box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
   -moz-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
   -webkit-box-shadow: inset 1px 1px 1px rgba(0,0,0,0.1);
}
a:link {
   color:#0066CC;
}
a:visited {
   color:#743399;
}
a:active,
a:hover {
   color: #FF4B33;
}

/* スクリーンリーダーのみに向けたテキスト */
.screen-reader-text {
   position: absolute;
   left: -9000px;
}



/* =ヘッダー
-------------------------------------------------------------- */

#header {
   padding: 30px 0 0 0;
}
#site-title {
   float: left;
   margin: 0 0 18px 0;
   width: 700px;
   font-size: 30px;
   line-height: 36px;
}
#site-title a {
   color: #000;
   font-weight: bold;
   text-decoration: none;
}
#site-description {
   clear: right;
   float: right;
   font-style: italic;
   margin: 14px 0 18px 0;
   width: 220px;
}

/* これはカスタムヘッダー画像です。 */
#branding img {
   clear: both;
   border-top: 4px solid #000;
   display: block;
   border-bottom: 1px solid #000;
}



/* =メニュー
-------------------------------------------------------------- */

#access {
   background: #000;
   margin: 0 auto;
   width: 940px;
   display:block;
   float:left;
}
#access .menu-header,
div.menu {
   font-size: 13px;
   margin-left: 12px;
}
#access .menu-header ul,
div.menu ul {
   list-style: none;
   margin: 0;
}
#access .menu-header li,
div.menu li {
   float:left;
   position: relative;
}
#access a {
   display:block;
   text-decoration:none;
   color:#aaa;
   padding:0 10px;
   line-height:38px;
}
#access ul ul {
   display:none;
   position:absolute;
   top:38px;
   left:0;
   float:left;
   box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
   -moz-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
   -webkit-box-shadow: 0px 3px 3px rgba(0,0,0,0.2);
   width: 180px;
   z-index: 99999;
}
#access ul ul li {
   min-width: 180px;    
}
#access ul ul ul {
   left:100%;
   top:0;
}
#access ul ul a {
   background:#333;
   height:auto;
   line-height:1em;
   padding:10px;
   width: 160px;
}
#access li:hover &gt; a,
#access ul ul :hover &gt; a {
   color:#fff;
   background:#333;
}
#access ul li:hover &gt; ul {
   display:block;
}
#access ul li.current_page_item &gt; a,
#access ul li.current-menu-ancestor &gt; a,
#access ul li.current-menu-item &gt; a,
#access ul li.current-menu-parent &gt; a {
   color: #fff;
}

* html #access ul li.current_page_item a,
* html #access ul li.current-menu-ancestor a,
* html #access ul li.current-menu-item a,
* html #access ul li.current-menu-parent a,
* html #access ul li a:hover {
   color:#fff;
}

/* =コンテンツ
-------------------------------------------------------------- */

#main {
   overflow: hidden;
   padding: 40px 0 0 0;
}
#content {
   margin-bottom: 36px;
}
#content,
#content input,
#content textarea {
   color: #333;
   font-size: 16px;
   line-height: 24px;
}
#content p,
#content ul,
#content ol,
#content dd,
#content pre,
#content hr {
   margin-bottom:24px;
}
#content ul ul,
#content ol ol,
#content ul ol,
#content ol ul {
   margin-bottom:0;
}
#content pre,
#content kbd,
#content tt,
#content var {
   font-size: 15px;
   line-height: 21px;
}
#content code {
   font-size: 13px;
}
#content dt,
#content th {
   color: #000;
}
#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6 {
   color: #000;
   margin: 0 0 20px 0;
   line-height: 1.5em;
}
#content table {
   border: 1px solid #e7e7e7;
   text-align: left;
   margin: 0 -1px 24px 0;
   width: 100%;
}
#content tr th,
#content thead th {
   color: #888;
   font-size: 12px;
   font-weight: bold;
   line-height: 18px;
   padding: 9px 24px;
}
#content tr td {
   border-top: 1px solid #e7e7e7;
   padding: 6px 24px;
}
#content tr.odd td {
   background: #F2F7FC;
}
.hentry {
   margin: 0 0 48px 0;
}
.home .sticky {
   background: #F2F7FC;
   border-top: 4px solid #000;
   padding: 18px 20px;
   margin-left: -20px;
   margin-right: -20px;
}
.single .hentry {
   margin: 0 0 36px 0;
}
.page-title {
   color: #000;
   font-size: 14px;
   font-weight: bold;
   margin: 0 0 36px 0;
}
.page-title span {
   color: #333;
   font-size: 16px;
   font-style: italic;
   font-weight: normal;
}
.page-title a:link,
.page-title a:visited {
   color:#888;
   text-decoration: none;
}
.page-title a:active,
.page-title a:hover {
   color: #FF4B33;
}
#content .entry-title {
   color: #000;
   font-size: 21px;
   line-height: 1.3em;
   font-weight: bold;
   margin-bottom: 0;
}
.entry-title a:link,
.entry-title a:visited {
   color:#000;
   text-decoration: none;
}
.entry-title a:active,
.entry-title a:hover {
   color: #FF4B33;
}
.entry-meta {
   color: #888;
   font-size: 12px;
}
.entry-meta abbr,
.entry-utility abbr {
   border: none;
}
.entry-meta abbr:hover,
.entry-utility abbr:hover {
   border-bottom: 1px dotted #666;
}
.entry-content,
.entry-summary {
   clear: both;
   padding: 12px 0 0 0;
}
#content .entry-summary p:last-child {
   margin-bottom: 12px;
}
.entry-content fieldset {
   border: 1px solid #E7E7E7;
   margin: 0 0 24px 0;
   padding: 24px;
}
.entry-content fieldset legend {
   background: #fff;
   color: #000;
   font-weight: bold;
   padding: 0 24px;
}
.entry-content input {
   margin: 0 0 24px 0;
}
.entry-content input.file,
.entry-content input.button {
   margin-right: 24px;
}
.entry-content label {
   color: #888;
   font-size: 12px;
}
.entry-content select {
   margin: 0 0 24px 0;
}
.entry-content sup,
.entry-content sub {
   font-size: 10px;
}
.entry-content blockquote.left {
   float: left;
   margin-left: 0;
   margin-right: 24px;
   text-align: right;
   width: 33%;
}
.entry-content blockquote.right {
   float: right;
   margin-left: 24px;
   margin-right: 0;
   text-align: left;
   width: 33%;
}
.page-link {
   color: #000;
   font-weight:bold;
   margin:0 0 22px 0;
   word-spacing:0.5em;
}
.page-link a:link,
.page-link a:visited {
   background: #f1f1f1;
   color:#333;
   font-weight:normal;
   padding:0.5em 0.75em;
   text-decoration:none;
}
.home .sticky .page-link a {
   background: #D9E8F7;
}
.page-link a:active,
.page-link a:hover {
   color: #FF4B33;
}
.page .edit-link {
   clear: both;
   display: block;
}
#entry-author-info {
   background: #F2F7FC;
   border-top: 4px solid #000;
   padding: 18px 20px;
   margin: 24px 0;
   overflow: hidden;
   clear: both;
   font-size: 14px;
   line-height: 20px;
}
#entry-author-info #author-avatar {
   background: #fff;
   border: 1px solid #e7e7e7;
   float: left;
   margin: 0 -104px 0 0;
   padding: 11px;
   height: 60px;
}
#entry-author-info #author-description {
   float: left;
   margin: 0 0 0 104px;
}
#entry-author-info h2 {
   color: #000;
   font-weight: bold;
   font-size: 100%;
   margin-bottom: 0;
}
.entry-utility {
   color: #888;
   font-size: 12px;
   line-height: 18px;
   clear: both;
}
.entry-meta a,
.entry-utility a {
   color: #888;
}
.entry-meta a:hover,
.entry-utility a:hover {
   color: #FF4B33;
}
#content .video-player {
   padding: 0;
}



/* Asides
-------------------------------------------------------------- */

.home #content .category-asides p {
   font-size: 14px;
   line-height: 20px;
   margin-bottom: 10px;
   margin-top:0;
}
.home .hentry.category-asides {
   padding: 0;
}
.home #content .category-asides .entry-content {
   padding-top: 0;
}




/* ギャラリーの並べ方
-------------------------------------------------------------- */

.category-gallery {
   margin-bottom: 48px;
}
.category-gallery h2 {
   margin-top: 10px;
}
.category-gallery .entry-meta {
}
.category-gallery .size-thumbnail img {
   border: 10px solid #f1f1f1;
   margin-bottom: 0;
}
.category-gallery .gallery-thumb {
   float: left;
   margin-right:20px;
   margin-top: -4px;
}
.home #content .category-gallery .entry-content p {
   display: inline;
}
.home #content .category-gallery .entry-utility {
   padding-top:4px;
}


/* 添付ファイルのページ
-------------------------------------------------------------- */

.entry-content .attachment img {
   margin-bottom: 0;
}
.attachment .entry-content .entry-caption {
   font-size: 140%;
   margin-top: 24px;
}
.attachment .entry-content .nav-previous a:before {
   content: '\2190&amp;#92;&amp;#48;0a0';
}
.attachment .entry-content .nav-next a:after {
   content: '&amp;#92;&amp;#48;0a0\2192';
}



/* 画像
-------------------------------------------------------------- */

#content img {
   margin: 0;
   max-width: 640px;
}
#content .attachment img {
   max-width: 900px;
}
#content .alignleft,
#content img.alignleft {
   display: inline;
   float: left;
   margin-right: 24px;
   margin-top: 4px;
}
#content .alignright,
#content img.alignright {
   display: inline;
   float: right;
   margin-left: 24px;
   margin-top: 4px;
}
#content .aligncenter,
#content img.aligncenter {
   clear: both;
   display: block;
   margin-left: auto;
   margin-right: auto;
}
#content img.alignleft,
#content img.alignright,
#content img.aligncenter {
   margin-bottom: 12px;
}
#content .wp-caption {
   background: #f1f1f1;
   line-height: 18px;
   text-align: center;
   margin-bottom: 20px;
   padding: 4px;
}
#content .wp-caption img {
   margin: 5px 5px 0;
}
#content .wp-caption p.wp-caption-text {
   margin: 5px;
   color: #888;
   font-size: 12px;
}
#content .wp-smiley {
   margin:0;
}
#content .gallery {
   margin: auto;
}
#content .gallery .gallery-item {
   float: left;
   margin-top: 0;
   text-align: center;
   width: 33%;
}
#content .gallery img {
   border: 2px solid #cfcfcf;
}
#content .gallery .gallery-caption {
   color: #888;
   font-size: 12px;
   margin: 0 0 12px;
}
#content .gallery dl {
   margin: 0;
}
#content .gallery img {
   border: 10px solid #f1f1f1;
}
#content .gallery br+br {
   display: none;
}



/* =ナビゲーション
-------------------------------------------------------------- */

.navigation {
   font-size:  12px;
   line-height: 18px;
   overflow: hidden;
   color: #888;
}
.navigation a:link,
.navigation a:visited {
   color: #888;
   text-decoration: none;
}
.navigation a:active,
.navigation a:hover {
   color: #FF4B33;
}
.nav-previous {
   float: left;
   width: 50%;
}
.nav-next {
   float: right;
   width: 50%;
   text-align:right;
}
#nav-above {
   margin: 0 0 18px 0;
}
#nav-above {
   display: none;
}
.paged #nav-above,
.single #nav-above {
   display: block;
}
#nav-below {
   margin: -18px 0 0 0;
}



/* =コメント
-------------------------------------------------------------- */
#comments {
   clear: both;
}
#comments .navigation {
   padding: 0 0 18px 0;
}
h3#comments-title,
h3#reply-title {
   color: #000;
   font-weight: bold;
   font-size: 20px;
   margin-bottom: 0;
}
h3#comments-title {
   padding: 24px 0;
}
.commentlist {
   list-style: none;
   margin: 0;
}
.commentlist li.comment {
   border-bottom: 1px solid #e7e7e7;
   line-height: 24px;
   margin: 0 0 24px 0;
   padding: 0 0 0 56px;
   position: relative;
}
.commentlist li:last-child {
   border-bottom:none;
   margin-bottom:0;
}
#comments .comment-body ul,
#comments .comment-body ol {
   margin-bottom: 18px;
}
#comments .comment-body p:last-child {
   margin-bottom: 6px;
}
#comments .comment-body blockquote p:last-child {
   margin-bottom: 24px;
}
.commentlist ol {
   list-style: decimal;
}
.commentlist .avatar {
   position: absolute;
   top: 4px;
   left: 0;
}
.comment-author {
}
.comment-author cite {
   color: #000;
   font-style: normal;
   font-weight: bold;
}
.comment-author .says {
   font-style: italic;
}
.comment-meta {
   font-size: 12px;
   margin: 0 0 18px 0;
}
.comment-meta a:link,
.comment-meta a:visited {
   color: #888;
   text-decoration: none;
}
.comment-meta a:active,
.comment-meta a:hover {
   color: #FF4B33;
}
.commentlist .even {
}
.commentlist .bypostauthor {
}
.reply {
   font-size: 12px;
   padding: 0 0 24px 0;
}
.reply a,
a.comment-edit-link {
   color: #888;
}
.reply a:hover,
a.comment-edit-link:hover {
   color: #FF4B33;
}
.commentlist .children {
   list-style: none;
   margin: 0;
}
.commentlist .children li {
   border: none;
   margin: 0;
}
.nopassword,
.nocomments {
   display: none;
}
#comments .pingback {
   margin-bottom: 18px;
   padding-bottom: 18px;
   border-bottom: 1px solid #e7e7e7;
}
.commentlist li.comment+li.pingback {
   margin-top: -6px;
}
#comments .pingback p {
   color: #888;
   font-size: 12px;
   line-height: 18px;
   display:block;
   margin: 0;
}
#comments .pingback .url {
   font-style: italic;
   font-size: 13px;
}



/* コメントフォーム */
input[type=submit] {
   color: #333;
}
#respond {
   margin: 24px 0;
   border-top: 1px solid #e7e7e7;
   overflow: hidden;
   position: relative;
}
#respond p {
   margin: 0;
}
#respond .comment-notes {
   margin-bottom: 1em;
}
.form-allowed-tags {
   line-height: 1em;
}
.children #respond {
   margin: 0 48px 0 0;
}
h3#reply-title {
   margin: 18px 0;
}
#comments-list #respond {
   margin: 0 0 18px 0;
}
#comments-list ul #respond {
   margin: 0;
}
#cancel-comment-reply-link {
   font-size: 12px;
   line-height: 18px;
   font-weight: normal;
}
#respond .required {
   color:#FF4B33;
   font-weight:bold;
}
#respond label {
   color: #888;
   font-size: 12px;
}
#respond input {
   margin:0 0 9px;
   width:98%;
}
#respond textarea {
   width:98%;
}
#respond .form-allowed-tags {
   color: #888;
   font-size: 12px;
   line-height: 18px;
}
#respond .form-allowed-tags code {
   font-size: 11px;
}
#respond .form-submit {
   margin: 12px 0;
}
#respond .form-submit input {
   width: auto;
   font-size: 14px;
}


/* =ウィジェットエリア
-------------------------------------------------------------- */

.widget-area ul {
   list-style: none;
   margin-left: 0;
}
.widget-area ul ul {
   list-style: square;
   margin-left: 1.3em;
}
.widget_search #s { /* この指定で検索の入力フォームを列からはみ出ないようにしています。 */
   width: 60%;
}
.widget_search label {
   display:none;
}
.widget-container {
   margin: 0 0 18px 0;
}
.widget-title {
   color: #222;
   font-weight: bold;
}
.widget-area a:link,
.widget-area a:visited {
   text-decoration: none;
}
.widget-area a:active,
.widget-area a:hover {
   text-decoration: underline;
}
.widget-area .entry-meta {
   font-size: 11px;
}
#wp_tag_cloud div {
   line-height: 1.6em;
}
#wp-calendar {
   width:100%;
}
#wp-calendar caption {
   font-weight: bold;
   color: #222;
   text-align: left;
   font-size:14px;
   padding-bottom: 4px;
}
#wp-calendar thead {
   font-size:11px;
}
#wp-calendar thead th {
}
#wp-calendar tbody {
   color: #aaa;
}
#wp-calendar tbody td {
   padding: 3px 0 2px;
   background: #f5f5f5;
   border:1px solid #fff;
   text-align: center;
}
#wp-calendar tbody .pad {
   background: none;
}
#wp-calendar tfoot #next {
   text-align: right;
}
.widget_rss a.rsswidget {
   color: #000;
}
.widget_rss a.rsswidget:hover {
   color: #FF4B33;
}
.widget_rss .widget-title img {
   height: 11px;
   width: 11px;
}

/* メインサイドバー */
#main .widget-area ul {
   margin-left: 0;
   padding: 0 20px 0 0;
}
#main .widget-area ul ul {
   border: none;
   margin-left: 1.3em;
   padding: 0;
}
#primary {
}
#secondary {
}

/* フッターウィジェットエリア */
#footer-widget-area {
}



/* =フッター
-------------------------------------------------------------- */

#footer {
   margin-bottom: 20px;
}
#colophon {
   border-top: 4px solid #000;
   margin-top: -4px;
   padding: 18px 0;
   overflow: hidden;
}
#site-info {
   font-weight: bold;
}
#site-info a {
   color: #000;
   text-decoration: none;
}
#site-generator {
   position: relative;
   font-style: italic;
}
#site-generator a {
   color: #666;
   display:inline-block;
   text-decoration: none;
   background: url(images/wordpress.png) center left no-repeat;
   padding-left: 20px;
   line-height: 16px;
}
#site-generator a:hover {
   text-decoration: underline;
}
img#wpstats {
   display:block;
   margin: 0 auto 10px;
}



/* Mobile Safari ( iPad, iPhone and iPod Touch )
-------------------------------------------------------------- */

pre {
   -webkit-text-size-adjust: 140%;
}
code {
   -webkit-text-size-adjust: 160%;
}
#access,
.entry-meta,
.entry-utility,
.navigation,
.widget-area {
   -webkit-text-size-adjust: 120%;
}
#site-description {
   -webkit-text-size-adjust: none;
}



/* =印刷用スタイル
-------------------------------------------------------------- */

@media print {
   body {
        background:none !important;
   }
   #wrapper {
        float: none !important;
        clear: both !important;
        display: block !important;
        position: relative !important;
   }
   #header {
        border-bottom: 2pt solid #000;
        padding-bottom: 18pt;
   }
   #colophon {
        border-top: 2pt solid #000;
   }
   #site-title,
   #site-description {
        float: none;
        margin: 0;
        padding:0;
        line-height: 1.4em;
   }
   #site-title {
        font-size: 13pt;
   }
   .entry-content {
        font-size: 14pt;
        line-height: 1.6em;
   }
   .entry-title {
        font-size: 21pt;
   }
   #access,
   #branding img,
   #respond,
   .comment-edit-link,
   .edit-link,
   .navigation,
   .page-link,
   .widget-area {
        display: none !important;
   }
   #container,
   #header,
   #footer {
        width: 100%;
        margin: 0;
   }
   #content,
   .one-column #content {
        width: 100%;
        margin: 24pt 0 0;
   }
   .wp-caption p {
        font-size: 11pt;
   }
   #site-info,
   #site-generator {
        float: none;
        width: auto;
   }
   #colophon {
        width: auto;
   }
   img#wpstats {
        display:none
   }
   #site-generator a {
        padding: 0;
   margin: 0;
   }
   #entry-author-info {
        border: 1px solid #e7e7e7;
   }
   #main {
        display:inline;
   }
   .home .sticky {
        border: none;
   }
}
[/css]

<h3><a id="tt_tag">tag.php</a></h3>
[php]
&lt;?php
/**
* タグ別アーカイブを表示するためのテンプレート。
*
* @package WordPress
* @subpackage Twenty_Ten
* @since Twenty Ten 1.0
*/

get_header(); ?&gt;

         &lt;div id=&quot;container&quot;&gt;
              &lt;div id=&quot;content&quot; role=&quot;main&quot;&gt;

                   &lt;h1 class=&quot;page-title&quot;&gt;&lt;?php
                        printf( __( 'Tag Archives: %s', 'twentyten' ), '&lt;span&gt;' . single_tag_title( '', false ) . '&lt;/span&gt;' );
                   ?&gt;&lt;/h1&gt;

&lt;?php
/* タグ別アーカイブが記事を出力するためにループを走らせます。
* 子テーマでこれを上書きしたい場合は、
* loop-tag.php ファイルを含めると、こちらが使われます。
*/
get_template_part( 'loop', 'tag' );
?&gt;
              &lt;/div&gt;&lt;!-- #content --&gt;
         &lt;/div&gt;&lt;!-- #container --&gt;

&lt;?php get_sidebar(); ?&gt;
&lt;?php get_footer(); ?&gt;
[/php]<p>&copy; 2012 <a href="http://www.odysseygate.com/" title="Odysseygate.com">Odysseygate.com</a> This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact odysseygate@gmail.com so we can take legal action immediately.</p><p>鼻からカフェモカ。</p>]]></description>
		<wfw:commentRss>http://8bitodyssey.com/archives/1651/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://8bitodyssey.com/archives/1651" />
	</item>
		<item>
		<title>翻訳記事：『Twenty Tenのヘッダー』</title>
		<link>http://8bitodyssey.com/archives/1637</link>
		<comments>http://8bitodyssey.com/archives/1637#comments</comments>
		<pubDate>Tue, 22 Jun 2010 13:53:00 +0000</pubDate>
		<dc:creator>おで</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[themes]]></category>
		<category><![CDATA[twenty ten]]></category>
		<category><![CDATA[wp3]]></category>

		<guid isPermaLink="false">http://8bitodyssey.com/archives/1637</guid>
		<description><![CDATA[<p><img src="http://www.odysseygate.com/images/pero.jpg" style="float: left; margin: 2px 5px 1px 0px"/></p>
<p>この記事は、<a href="http://ma.tt/" target="_blank">Matt</a> が書いた『<a href="http://ma.tt/2010/06/headers-of-twenty-ten/" target="_blank">The Headers of Twenty Ten</a>』を翻訳したものです。WordPress 3.0 で新しくなったデフォルトテーマ『Twenty Ten』に採用されたヘッダー画像のエピソードが詳しく紹介されています。WordPress ユーザのみならず、写真愛好家のみなさんも興味があるかと思い、拙いながらも翻訳をしてみました。</p> <span id="more-1637"></span>  <p>&#160;</p>  <p><a href="http://wordpress.org/development/2010/06/thelonious/" target="_blank">WordPress 3.0</a> の新しいデフォルトテーマである <a href="http://wordpress.org/extend/themes/twenty-ten" target="_blank">Twenty Ten</a> の計画を立ててデザインしているときに、ヘッダーは実に目立った特徴になるだろうと思っていて、テーマでみんなを興奮させられるようなものにしたいと思いました。Misty Look、Chaotic Soul、Ocean Mist、Cutline といった WordPress.com でもっとも人気のあるテーマはみな、目立写真付きヘッダーを特徴としています。</p>  <p>オープンソースプロジェクトのための適切なライセンス画像を見つけるのは骨が折れるので、僕は <a href="http://iammattthomas.com/" target="_blank">MT</a> に <a href="http://ma.tt/random-photos/" target="_blank">Ma.tt のランダム写真ページ</a> からいくらか見つけるよう、また彼が見つけられるものを調べるよう、依頼しました。ここにあるのはそれぞれ彼が選んだ画像です。ヘッダーフォームにあり、オリジナルの画像にリンクしています。撮影した場所と、写真の背景にある物語と一緒にどうぞ。</p>  <p><a href="http://ma.tt/2005/12/gallery-12-13-2005/i-img_6201/"><img title="path" alt="" src="http://8bitodyssey.com/wp-content/themes/twentyten/images/headers/path.jpg" width="500" height="104" /></a></p>  <p><a href="http://automattic.com/" target="_blank">Automattic</a> が創業したばかりの2005年12月、僕は関心を高めるとともに、コミュニティのみんなに会うために、ヨーロッパ旅行を計画をしていました。<a href="http://ma.tt/2005/12/en-route/" target="_blank">パリの Les Blogs</a> カンファレンスから始まり、 それからロンドンへ行き、WP meetup（編注：オフ会とでも訳せばいいのか…）で <a href="http://romanticrobot.net/" target="_blank">Mark Riley</a> (Podz として知られていたアーティスト) と <a href="http://www.brokenkode.com/" target="_blank">Khaled</a> に会いました。 最後にアイルランド、特にブラーニーに行き、Automattic の最初の社員である <a href="http://ocaoimh.ie/" target="_blank">Donncha O Caoimh</a> にじかに会い、彼の名前をどう発音するのか知りました。&#160; <a href="http://ma.tt/2005/12/gallery-12-13-2005/" target="_blank">僕たちは一緒にフォトウォークに行き</a>、 ブラーニー城へと続く私道をのぼり、この寂しげな図を撮影しました。</p>  <p><a href="http://ma.tt/2010/01/munich-to-memphis/mcm_2052-2/"><img title="berries" alt="" src="http://8bitodyssey.com/wp-content/themes/twentyten/images/headers/berries.jpg" width="500" height="104" /></a></p>  <p>今年初め、ぼくはドイツのミュンヘンで開催された <a href="http://www.dld-conference.com/" target="_blank">DLD カンファレンス</a>に初めて出席しました。とても寒く、疲れていて、また起きたのが朝早すぎてメンフィスへの大西洋越えの航空便に乗るための空港への車を捕まえられずにいました。 半分眠ったまま、空港への道の途中で前夜に森に降り積もったばかりの美しいパウダースノーに気づき、開放絞りで高速シャッターを切りました。車の窓の色合いがより夢のようにしてくれました。約時速50キロで進む車から、f/1.4 1/2500秒 50mm のレンズでの撮影。</p>  <p><a href="http://ma.tt/2009/04/kyoto-cherry-blossoms/mcm_5582-3/"><img title="cherryblossoms" alt="" src="http://8bitodyssey.com/wp-content/themes/twentyten/images/headers/cherryblossoms.jpg" width="500" height="104" /></a></p>  <p>この桜は、次の二つの写真と同じように、<a href="http://ma.tt/2009/04/kyoto-cherry-blossoms/" target="_blank">同じ日に</a>撮影したものです。ぼくは WordCamp Kansai （訳注：<a href="http://japan.wordcamp.org/2009/04/11/wordcamp-kansai-2009-report/" target="_blank">WordCamp 関西懇親会</a>のこと）のために大阪にいて、<a href="http://blog.detlog.org/">マクラケン直子</a>が京都にすぐ近くのお寺を案内してくれました。 桜（そして梅も）の花はちょうど咲き始めたばかりで、すべては魔法のようでした。MT が電線が見えなくなるように巧みにトリミングしたのが分かるでしょう。 70-200mm のレンズの思いっきりワイドにして f/4 で撮影。</p>  <p><a href="http://ma.tt/2009/04/kyoto-cherry-blossoms/mcm_5630-2/"><img title="forestfloor" alt="" src="http://8bitodyssey.com/wp-content/themes/twentyten/images/headers/forestfloor.jpg" width="500" height="104" /></a></p>  <p>太陽が沈み始め、樹木がきらびやかになりました。70-200mm レンズの70mm、f/2.8、1/1600秒、ISO 200で撮影。</p>  <p><a href="http://ma.tt/2009/04/kyoto-cherry-blossoms/mcm_5615/"><img title="fern" alt="" src="http://8bitodyssey.com/wp-content/themes/twentyten/images/headers/fern.jpg" width="500" height="104" /></a></p>  <p>この植物を何というのか分かりませんが（訳注：ウラジロのように見えますが…）、京都の道端に生えていたのは確かです。70-200mm のレンズを 86mm にズームして、f/2.8、1/250秒、ISO 200で撮影。</p>  <p><a href="http://ma.tt/2009/02/taj-mahal-agra/mcm_9582/"><img title="concave" alt="" src="http://8bitodyssey.com/wp-content/themes/twentyten/images/headers/concave.jpg" width="500" height="104" /></a></p>  <p>この「凸形の」画像は、アグラのタージ・マハルに隣接するモスクの屋根のものです。50mmのレンズで開放絞りの f/1.4で撮影。僕は WordCamp Delhi のため、<a href="http://omis.me/" target="_blank">Om</a> とインドにいて、彼がニューヨークそれからぼくたちが出会ったサンフランシスコに引っ越す前に育った町を少し探検しました。タージ・マハルは印象的な場所で、一日中興奮するようなスナップでいっぱいでした。たとえば、<a href="http://ma.tt/2009/02/taj-mahal-agra/mcm_9638/" target="_blank">自転車の背に載せて運ばれる二つのソファ</a>や、<a href="http://ma.tt/2009/02/taj-mahal-agra/p1000505/" target="_blank">しばらくプロフィールにしていたジャンプしてる写真</a>、 <a href="http://ma.tt/2009/02/taj-mahal-agra/mcm_9460/" target="_blank">僕の好きな Om のポートレートの一枚</a>、 <a href="http://ma.tt/2009/02/taj-mahal-agra/mcm_9498/" target="_blank">キリスト教徒、ムスリム、ヒンドゥー教徒が一列に並んでいる、インドの宗教的多様性をおさめた</a>写真になります。トルコの写真を投稿し終えた時、それが明らかであるようにモスクの幾何学模様を得ることができません。この参拝が Om に<a href="http://gigaom.com/2009/02/19/what-the-taj-mahal-and-apple-have-in-common/" target="_blank">タージ・マハルとアップルが共通して持っているものに関する投稿</a>を書く着想を与えたのです。</p>  <p><a href="http://ma.tt/2009/07/ulusaba-day-2/mcm_3037/"><img title="sunset" alt="" src="http://8bitodyssey.com/wp-content/themes/twentyten/images/headers/sunset.jpg" width="500" height="104" /></a></p>  <p>このヘッダーは、「夕日」と名付けられていますが、実際には日の出です。 それも無理からぬ間違いです。というのも、MT がぼくについて知っていることからすれば、そんなに早く起きるなんて想像もしなかったのでしょう。しかし、この朝は特別でした：<a href="http://www.ulusaba.virgin.com/" target="_blank">Ulusaba</a> と呼ばれる南アフリカの禁猟区で Richard Branson と一緒の旅行の二日目だったのです。この朝日は、ドライブに出発する部屋から丘を下って撮影しました。そこでは丁度獲物を手に入れたライオンの群れを見つけ、<a href="http://www.virginunite.com/" target="_blank">Virgin Unite</a> がサポートしている<a href="http://www.ulusaba.virgin.com/en/ulusaba/pride_n_purpose" target="_blank">プロジェクト</a>を訪れ、最後に場内でごちそう／お祭りに参加しました。</p>  <p><a href="http://www.getpersonas.com/en-US/gallery/Designer/WordPress.org"><img title="inkwell" alt="" src="http://8bitodyssey.com/wp-content/themes/twentyten/images/headers/inkwell.jpg" width="500" height="104" /></a></p>  <p>最後の一枚は全然写真じゃないけれど、<a href="http://www.thebigpugh.com/" target="_blank">Chad Pugh</a> が僕たちの <a href="http://www.getpersonas.com/en-US/gallery/Designer/WordPress.org" target="_blank">Firefox Personas project</a> のために書いてくれた2枚の素晴らしい絵のうちの1枚なので、どうしても触れておきたかったのです。サンフランシスコにある Automattic ラウンジでは、4.6メートルに引き伸ばしたものを見ることができます。</p>  <p>僕の写真が広範囲で楽しんでもらえるということを知ると、最初にオープンソースに貢献した時と同様の怖さがあることを認めなければなりません。「WordPress チーム」として style.css にクレジットされることで、多くの人々の作業と創造性の極地である、Twenty Ten の作者を見ると、ある種の喜びもあります。</p>  <p>さぁ、Twenty Ten をあなた自身のものにしてください。MT がどのようにトリミングしたかに気を留めてみてください。そしてまた、僕が好きな Twenty Ten の特徴の一つを調べてみてください：投稿ごと、あるいはページごとにカスタムヘッダーを上書きできること、つまりそれぞれの投稿がただひとつだけの雪のかけらとなりうるということです。</p>  <hr />  <p>大体こんな意味かなぁと思って訳してみましたが、間違いとかあったらオシエテクダサイ(/-＼)</p><p>&copy; 2012 <a href="http://www.odysseygate.com/" title="Odysseygate.com">Odysseygate.com</a> This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact odysseygate@gmail.com so we can take legal action immediately.</p><p>鼻からカフェモカ。</p>]]></description>
		<wfw:commentRss>http://8bitodyssey.com/archives/1637/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://8bitodyssey.com/archives/1637" />
	</item>
		<item>
		<title>私がカスタム投稿タイプを使うべき理由</title>
		<link>http://8bitodyssey.com/archives/1628</link>
		<comments>http://8bitodyssey.com/archives/1628#comments</comments>
		<pubDate>Sun, 06 Jun 2010 14:56:00 +0000</pubDate>
		<dc:creator>おで</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[ネタ]]></category>

		<guid isPermaLink="false">http://8bitodyssey.com/archives/1628</guid>
		<description><![CDATA[<p><img src="http://www.odysseygate.com/images/pero.jpg" style="float: left; margin: 2px 5px 1px 0px"/></p>
<p>ここしばらく WordPress 3.0 を研究している。</p>  <p>一番の目玉は WordPress MU との統合だが、全サイト同一のテーブルに入る仕様のため、(どれほどそれがボトルネックになるかは不明だが)単一テーブルへのアクセス集中を嫌って、私は導入しないだろう。</p>  <p>そうなると、目玉は残りは カスタムタクソノミーとカスタム投稿タイプだ。</p> <span id="more-1628"></span>  <p><a href="http://8bitodyssey.com/archives/1620">カスタムタクソノミー</a>は、カテゴリからタグへという、2.3 から続く流れの集大成だ。全てはタグへ。すべてをひとつのレイヤーで扱えたほうが便利だからだ。</p>  <p>だがしかし、従来のカテゴリのように扱いたい、という需要も少なからずある。だったら、タグに階層を設け、階層のあるものはカテゴリと呼び、全部のタグを呼び出したら、カテゴリと便宜的に呼んだタグも一緒に表示できる。これが、3.0 で目指した姿だ。</p>  <p>しかし、利用者が体感できるケースは少ないだろう。新規のサイトではカスタムタクソノミーを導入する動機があるだろうが、既存のサイトは従来のカテゴリとタグの運用で十分だ。</p>  <p>だから、私がカスタムタクソノミーを喜んで使うことはしばらく先だろう。新機能なのに残念だ。</p>  <p>残ったのは<a href="http://8bitodyssey.com/archives/1624">カスタム投稿タイプ</a>だ。当初私はこれも使わないだろうと思っていた。テーマごとに複雑なコードが必要で、表示にも気を使う。</p>  <p>しかし、救世主が現れた。Custom Post Type UI プラグインだ。これを有効にして、管理画面から必要項目を有効にしさえすればいい。</p>  <p>実際使ってみるとカスタム投稿タイプはことのほかいい。一番のメリットは、投稿の新規追加画面の入力項目をコントロールできることだ。</p>  <p>いま、私は自分の部署のイントラサイトを WordPress 3.0 で構築している。部内の周知事項や会議資料の所在を共有するのに、CMS は都合がよい。ログインしてもらい、ブログを書く要領で皆に更新してもらおうと思っている。</p>  <p>ところがだ。WordPress をクライアントに納品したことがあるあなたは言われたことがあるかもしれない。更新をしようと、投稿の新規追加を開いた奴らは決まってこういうのだ。</p>  <p>「この、抜粋、とか、トラックバックって、何を入力したらいいの？」</p>  <p>分からなかったら、何も入力しなければいいのに、そうはできないようだ。</p>  <p>「入力しないと、誤動作するかと思って。テストでも、分からなくても答えを書けって先生に言われたし。」</p>  <p>おまえは、中学生か。こうした無用なやりとりを無くすためにも、カスタム投稿タイプは最高だ。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4014/4666066273_d2d9546272_b.jpg"><img id="thumbe67e049028388207906944b595a1334c" title="Click to enlarge" alt="カスタム投稿の新規追加" src="http://farm5.static.flickr.com/4014/4666066273_d2d9546272.jpg" width="334" height="500" /></a></p>  <div id="caption-for-thumbe67e049028388207906944b595a1334c" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4666066273/" target="_blank">カスタム投稿の新規追加</a></div>  <p></p>  <p>いらないものはなくしてしまえばいい。タイトルと本文だけで十分だ。これだけシンプルなら、もう質問は来ないだろう。</p>  <p>何かを選ぶことは、何かをあきらめることだ。</p>  <p>いちいち、質問がくる投稿の新規追加なんて、もういらない。投稿は全部本文とコンテンツに絞ったカスタム投稿タイプの新規追加から行えばいいのだ。</p>  <p>私たちはやりたいことがあって新機能を使うのではない。新機能を使うため、試すのだ。</p>  <p>それでは本末転倒だ、という人に対して、私はこう言いたい。「仏壇に祈るのに理由がいるか？」と。</p>  <p>さぁ、ここまで読めばあなたもカスタム投稿タイプを使ってみたくなっただろう。</p>  <p>いますぐ、WordPress 3.0 をインストールし、カスタム投稿タイプを試すのだ。そして一緒に苦しもうではないか。きっと新しい世界が開けるはずだ。</p>  <p>※本記事は、カスタム投稿タイプとカスタムタクソノミーの融合に悩んでいた最中に、RSS で読んだ「<a href="http://business.nikkeibp.co.jp/article/life/20100603/214761/">私がiPadを買うべきでない理由</a>」へのオマージュです。冗談なので本気にしないよーに。</p><p>&copy; 2012 <a href="http://www.odysseygate.com/" title="Odysseygate.com">Odysseygate.com</a> This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact odysseygate@gmail.com so we can take legal action immediately.</p><p>鼻からカフェモカ。</p>]]></description>
		<wfw:commentRss>http://8bitodyssey.com/archives/1628/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://8bitodyssey.com/archives/1628" />
	</item>
		<item>
		<title>カスタム投稿タイプ(Custom Post Type)の導入と使い方 [WordPress 3.0]</title>
		<link>http://8bitodyssey.com/archives/1624</link>
		<comments>http://8bitodyssey.com/archives/1624#comments</comments>
		<pubDate>Sat, 05 Jun 2010 06:20:00 +0000</pubDate>
		<dc:creator>おで</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[カスタム投稿タイプ]]></category>

		<guid isPermaLink="false">http://8bitodyssey.com/?p=1624</guid>
		<description><![CDATA[<p><img src="http://www.odysseygate.com/images/pero.jpg" style="float: left; margin: 2px 5px 1px 0px"/></p>
<p><a href="http://8bitodyssey.com/archives/1620" target="_blank">前回取り上げたカスタムタクソノミー</a>はなんだか既存のサイトには使いづらい雰囲気満載でしたが、今回取り上げるカスタム投稿タイプは期待度満点。</p>  <p>投稿やページとは別に、思うままにカスタマイズした投稿タイプを作成できます。導入方法、機能の概要、表示方法を順に見ていきましょう。</p> <span id="more-1624"></span>  <h3>カスタム投稿タイプの導入方法</h3>  <p>カスタム投稿タイプについて、カスタムタクソノミーの時と同様、プラグインを使う方法と、直接コードを書く方法があります。</p>  <h3></h3>  <h3>プラグインを使う</h3>  <p>前回も登場した（というか、こっちが本業の）<a href="http://wordpress.org/extend/plugins/custom-post-type-ui/">Custom Post Type UI</a> プラグインを導入します。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4003/4666689330_7ab18fba49_b.jpg"><img id="thumbd9ed745fb47612521d21d6ce1e02c58b" title="Click to enlarge" alt="custom post type UI プラグイン" src="http://farm5.static.flickr.com/4003/4666689330_7ab18fba49.jpg" width="334" height="500" /></a></p>  <div id="caption-for-thumbd9ed745fb47612521d21d6ce1e02c58b" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4666689330/" target="_blank">custom post type UI プラグイン</a></div>  <p>Create New Custom Post Type 以下に入力していくと、簡単にカスタム投稿タイプを作成できます。</p>  <p>項目は以下の通り。</p>  <ul>   <li><strong>Post Type Name</strong>: （必須）カスタム投稿タイプの名前。コンピュータで読めるように設定する必要があるります。…つまり日本語はダメ→と思ったら通ってしまいました→が、通常の投稿を引っ張ってきてしまうので、やっぱり日本語ダメっぽい。 </li>    <li><strong>Label</strong>: カスタム投稿タイプのラベル。表示名。単語レベルで単数/複数を区別することが少ない日本語ではあまり関係ないありませんが、英語などでは複数形として設定するべきとされています。デフォルトでは、Post Type Name とおなじになるため、表示名を日本語にしたい場合はここで設定してください。 </li>    <li><strong>Singular Lable</strong>: カスタム投稿タイプの名前の単数形を設定します。上述の理由で日本語のラベルではあまり関係ないでしょう。 </li>    <li><strong>Public</strong>: カスタム投稿タイプが管理画面に表示されるかどうかを設定します。デフォルトでは &quot;True&quot;（表示される）。 </li>    <li><strong>Show UI</strong>: &quot;True&quot; にすると、管理画面に管理用の UI が表示されます。&quot;False&quot; にすると、UI は表示されません。 </li>    <li><strong>Capability Type</strong>: 読み書き・削除権限を構成するために使われる、とのことです。設定したタイプと同じ権限になるのだと思われます。デフォルトでは &quot;post&quot;。 </li>    <li><strong>Hierarchical</strong>: カスタム投稿タイプに親子関係を持たせるかどかを設定します。親・子にあたる投稿を指定できるようになります。デフォルトでは &quot;False&quot;。 </li>    <li><strong>Rewrite</strong>: パーマリンクのリライトフォーマットを設定します。デフォルトでは &quot;True&quot;。 </li>    <li><strong>Custom Rewrite Slug</strong>: パーマリンクのデフォルトフォーマットは Post Type Name となっていますが、別のものを使う場合はここに入力します。 </li>    <li><strong>Query_var</strong>: カスタムタクソノミー同様、用途が思いつきませんが、無難に &quot;True&quot; で。 </li>    <li><strong>Supports</strong>: カスタム投稿タイプの新規追加画面で、項目を表示するかどうかを設定できます。       <br />      <ul>       <li><strong>Title</strong>: タイトル入力欄の表示/非表示 </li>        <li><strong>Editor</strong>:&#160; 本文入力欄の表示/非表示 </li>        <li><strong>Excerpt</strong>: 抜粋入力欄の表示/非表示 </li>        <li><strong>Trackbacks</strong>: トラックバック入力欄の表示/非表示 </li>        <li><strong>Custom Fields</strong>: カスタムフィールド入力欄の表示/非表示 </li>        <li><strong>Comments</strong>: ディスカッション設定の表示/非表示 </li>        <li><strong>Revisions</strong>: リビジョンの表示/非表示 </li>        <li><strong>Post Thumnails</strong>: アイキャッチ画像設定の表示/非表示 </li>        <li><strong>Author</strong>: 作成者設定の表示/非表示 </li>        <li><strong>Page Attributes</strong>: ページ属性欄の表示/非表示 </li>        <li>以上、何か一つでも指定すれば、一つ以上表示されます。全部チェックを外すと、タイトルと本文のみになります。デフォルトはタイトルと本文のみです。 </li>     </ul>   </li> </ul>  <h3>ソースコードを書く</h3>  <p>使用中のテーマの functions.php に以下のコードを追加することでも使用できるようになります。こっちのほうがいろいろ設定できますね（他の変数は <a href="http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/register_post_type" target="_blank">関数リファレンス/register post type - WordPress Codex 日本語版</a> を参照）。プラグインなどを作成する場合は、以下のコードを参考にしてみてください。</p>

[php]
// カスタム投稿タイプを作成
// create custom post type
function odekon_custom_post_type() 
{
  $labels = array(
    'name' =&gt; _x('部内会議', 'post type general name'),
    'singular_name' =&gt; _x('議事録', 'post type singular name'),
    'add_new' =&gt; _x('部内会議を追加', 'book'),
    'add_new_item' =&gt; __('新しい部内会議を追加'),
    'edit_item' =&gt; __('部内会議を編集'),
    'new_item' =&gt; __('新しい部内会議'),
    'view_item' =&gt; __('部内会議を編集'),
    'search_items' =&gt; __('部内会議を探す'),
    'not_found' =&gt;  __('部内会議はありません'),
    'not_found_in_trash' =&gt; __('ゴミ箱に部内会議はありません'), 
    'parent_item_colon' =&gt; ''
  );
  $args = array(
    'labels' =&gt; $labels,
    'public' =&gt; true,
    'publicly_queryable' =&gt; true,
    'show_ui' =&gt; true, 
    'query_var' =&gt; true,
    'rewrite' =&gt; true,
    'capability_type' =&gt; 'post',
    'hierarchical' =&gt; false,
    'menu_position' =&gt; 2,
    'supports' =&gt; array('title','editor')
  ); 
  register_post_type('bunaikaigi',$args);
}

add_action('init', 'odekon_custom_post_type');
[/php]

<p>ちなみに、menu_position は管理画面のサイドバーでの表示位置を調整できる変数です。5 で投稿の下、10 でメディアの下、20 でページの下、null でデフォルトの一番下になります。…が裏技的に、0 または 1 でダッシュボードの上に、2 または 3 でダッシュボードの下に表示することができるみたいです。</p>  <p>publicly_queryable を true にすると通常のクエリに出てくるはずなんですが、出てこないので、このあと表示するためにがんばることになります。</p>  <h3>こ、これがカスタム投稿タイプの力なのかっ！</h3>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4014/4666066273_d2d9546272_b.jpg"><img id="thumbe67e049028388207906944b595a1334c" title="Click to enlarge" alt="カスタム投稿の新規追加" src="http://farm5.static.flickr.com/4014/4666066273_d2d9546272.jpg" width="334" height="500" /></a></p>  <div id="caption-for-thumbe67e049028388207906944b595a1334c" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4666066273/" target="_blank">カスタム投稿の新規追加</a></div>  <p></p>  <p>カスタム投稿タイプとして「ヘッドライン」という項目を作ってみました。Supports はタイトルと本文というシンプル構成です。これでもう、「おでこくん、Trackbacks というのはなにを入力したらよいのかね」などとクライアント（部長とか）に言わせたりはしません。「これがカスタム投稿タイプの力なのかっ！」と言わせてみせよう、ホトトギス。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4072/4666066325_2d1f355b05_b.jpg"><img id="thumb14e2a2e7a21f47b59715b0a8877fcb66" title="Click to enlarge" alt="カスタム投稿の一覧" src="http://farm5.static.flickr.com/4072/4666066325_2d1f355b05.jpg" width="500" height="334" /></a></p>  <div id="caption-for-thumb14e2a2e7a21f47b59715b0a8877fcb66" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4666066325/" target="_blank">カスタム投稿の一覧</a></div>  <p></p>  <p>通常の投稿と同じように、ヘッドラインの記事だけが並ぶ専用の一覧画面もできます。これは分かりやすい。</p>  <h3>カスタム投稿タイプを表示する</h3>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4057/4666689542_8befc890a2_b.jpg"><img id="thumb7fb0cffc2d71abc7135c2c440def3330" title="Click to enlarge" alt="案の定表示されません" src="http://farm5.static.flickr.com/4057/4666689542_8befc890a2.jpg" width="334" height="500" /></a></p>  <div id="caption-for-thumb7fb0cffc2d71abc7135c2c440def3330" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4666689542/" target="_blank">案の定表示されません</a></div>  <p>でもって、index.php を見ると案の定表示されません…。カスタムタクソノミーのときと同じように通常のクエリに含んでくれないみたいなんですね。</p>  <p>というわけで、TwentyTen テーマの loop.php の</p>

[php]
&lt;?php
	/* Start the Loop.
	 *
	 * In Twenty Ten we use the same loop in multiple contexts.
	 * It is broken into three main parts: when we're displaying
	 * posts that are in the gallery category, when we're displaying
	 * posts in the asides category, and finally all other posts.
	 *
	 * Additionally, we sometimes check for whether we are on an
	 * archive page, a search page, etc., allowing for small differences
	 * in the loop on each template without actually duplicating
	 * the rest of the loop that is shared.
	 *
	 * Without further ado, the loop:
	 */ ?&gt;
[/php]

<p>の後あたりに以下を追加してみました。</p>

[php]
&lt;?php $loop = new WP_Query( array( 'post_type' =&gt; 'headline', 'posts_per_page' =&gt; 5 ) ); ?&gt;

&lt;?php while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;

		&lt;div id=&quot;post-&lt;?php the_ID(); ?&gt;&quot; &lt;?php post_class(); ?&gt;&gt;
			&lt;h2 class=&quot;entry-title&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot; title=&quot;&lt;?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?&gt;&quot; rel=&quot;bookmark&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;

			&lt;div class=&quot;entry-meta&quot;&gt;
				&lt;?php twentyten_posted_on(); ?&gt;
			&lt;/div&gt;&lt;!-- .entry-meta --&gt;
			
			&lt;div class=&quot;entry-content&quot;&gt;
			&lt;?php the_content(); ?&gt;
			&lt;/div&gt;
		&lt;/div&gt;
&lt;?php endwhile; ?&gt;
[/php]

<p>すると…</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4046/4666066479_475d7380f0_b.jpg"><img id="thumb75e069b3bd1a99ae8530afb2e6cdc47b" title="Click to enlarge" alt="表示されました！" src="http://farm5.static.flickr.com/4046/4666066479_475d7380f0.jpg" width="334" height="500" /></a></p>  <div id="caption-for-thumb75e069b3bd1a99ae8530afb2e6cdc47b" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4666066479/" target="_blank">表示されました！</a></div>  <p>無事表示されました。内容は今適当に考えましたが、会社の部署のイントラサイトを WordPress 3.0 で作ろうかなと思っているのでその実験を兼ねています。</p>  <p>投稿の新規追加をシンプルに絞ったのもそのためですね。まだまだ仕様の通りになっていなかったり、うまくできなかったりするところもありますが、カスタム投稿タイプはすごくいいよいいよー！</p><p>&copy; 2012 <a href="http://www.odysseygate.com/" title="Odysseygate.com">Odysseygate.com</a> This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact odysseygate@gmail.com so we can take legal action immediately.</p><p>鼻からカフェモカ。</p>]]></description>
		<wfw:commentRss>http://8bitodyssey.com/archives/1624/feed</wfw:commentRss>
		<slash:comments>31</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://8bitodyssey.com/archives/1624" />
	</item>
		<item>
		<title>カスタムタクソノミー(Custom Taxonomy)の導入と使い方 [WordPress 3.0]</title>
		<link>http://8bitodyssey.com/archives/1620</link>
		<comments>http://8bitodyssey.com/archives/1620#comments</comments>
		<pubDate>Wed, 02 Jun 2010 14:59:00 +0000</pubDate>
		<dc:creator>おで</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[カスタム分類]]></category>

		<guid isPermaLink="false">http://8bitodyssey.com/?p=1620</guid>
		<description><![CDATA[<p><img src="http://www.odysseygate.com/images/pero.jpg" style="float: left; margin: 2px 5px 1px 0px"/></p>
<p>WordPress 2.8 から導入されたものの、タクソノミーという日本人にはまったく耳慣れない不遇な名前のせいで余り使われてこなかった（と思われる）Custom Taxonomy（カスタムタクソノミー）ですが、WordPress 3.0 では大幅にパワーアップ（予定）！</p>  <p>その改良点と、導入までの流れ、使い方を解説してみます。</p> <span id="more-1620"></span>  <h3>2.9: タグはすべて同じレベル</h3>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4021/4641692233_3ef41815bd_o.png"><img id="thumb5b1cc7c972da439d6a6c051f8ce5b122" title="Click to enlarge" alt="親子関係のないカスタムタクソノミー" src="http://farm5.static.flickr.com/4021/4641692233_6828158380.jpg" width="500" height="334" /></a></p>  <div id="caption-for-thumb5b1cc7c972da439d6a6c051f8ce5b122" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4641692233/" target="_blank">親子関係のないカスタムタクソノミー</a></div>  <p></p>  <p></p>  <p>2.9 までのカスタムタクソノミーはカテゴリで使えるような親子関係（階層構造）を持たず、すべて同じレベルになっていました。</p>  <p>※3.0 でも親子関係を持たないカスタムタクソノミーを作ることはできます。</p>  <h3>3.0: タグに親子関係を持たせられるようになった!!</h3>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm4.static.flickr.com/3395/4641692319_d92906ce66_o.png"><img id="thumb709037ee91ea4c315c15267be763e6b6" title="Click to enlarge" alt="親子関係のあるカスタムタクソノミー" src="http://farm4.static.flickr.com/3395/4641692319_7d1f56bf7f.jpg" width="500" height="334" /></a></p>  <div id="caption-for-thumb709037ee91ea4c315c15267be763e6b6" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4641692319/" target="_blank">親子関係のあるカスタムタクソノミー</a></div>  <p>3.0 でパワーアップする（予定の）カスタムタクソノミーでは、親子関係を持たせられるようになり、より柔軟な分類が可能となりました。</p>  <p>そのせいか、ますますカテゴリとの境界が曖昧になり、タクソノミーに親子関係を持たせると”Add New Category（日本語版では「新規カテゴリーを追加」と表示しています）”、親子関係を持たせないと”Add New Tag（日本語版では「新規タグを追加」）”と表示されています（上のスクリーンショット参照）。</p>  <p>カスタムタクソノミーは、post・page・link・custom post types の4種類からタイプを選ぶことができ、post を設定した場合は、サイドバーにメニュー項目が表示されるようになります。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4004/4642303476_35c40c2501_o.png"><img id="thumba5ca4c11c6707867a1be5c51ca8a7466" title="Click to enlarge" alt="投稿画面：親子関係のあるカスタムタクソノミー" src="http://farm5.static.flickr.com/4004/4642303476_961dd1a1e8.jpg" width="500" height="334" /></a></p>  <div id="caption-for-thumba5ca4c11c6707867a1be5c51ca8a7466" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4642303476/" target="_blank">投稿画面：親子関係のあるカスタムタクソノミー</a></div>  <p>親子関係のあるカスタムタクソノミーは、投稿画面ですでに登録されている項目から選択することができます。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm4.static.flickr.com/3353/4642303544_fae27d3fe3_o.png"><img id="thumba47409b74c8d3c73ff576b736384ba41" title="Click to enlarge" alt="投稿画面：親子関係のないカスタムタクソノミー" src="http://farm4.static.flickr.com/3353/4642303544_caa8426747.jpg" width="500" height="334" /></a></p>  <div id="caption-for-thumba47409b74c8d3c73ff576b736384ba41" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4642303544/" target="_blank">投稿画面：親子関係のないカスタムタクソノミー</a></div>  <p>一方、親子関係のないカスタムタクソノミーの場合、従来のタグ同様、入力しないといけません。ただし、子にあたるカスタムタクソノミーが存在しなくても、親子関係（hierarchical）を “True” にすれば、チェックボックスから選択することができるので、”True” にしておいたほうが便利ではないでしょうか。</p>  <h3>カスタムタクソノミーの導入方法</h3>  <p>では、このカスタムタクソノミーを導入してみましょう。なお、この解説は 3.0 RC 版を使っていますので、正式版と挙動が異なる場合があります。</p>  <h3>プラグインを使う</h3>  <p>WordCamp Yokohama 2010 の Nao さんのセッション「WordPress の現況 〜事例とバージョン 3.0 紹介〜」でも紹介のあった <a href="http://wordpress.org/extend/plugins/custom-post-type-ui/" target="_blank">Custom Post Type UI</a> プラグインを導入するのがもっとも簡単です。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4051/4663474780_fae1832e28_o.png"><img id="thumbfa3dbca0fa766609d184efdd811c4b72" title="Click to enlarge" alt="Custom Post Type UI プラグイン" src="http://farm5.static.flickr.com/4051/4663474780_aabd4470fb.jpg" width="334" height="500" /></a></p>  <div id="caption-for-thumbfa3dbca0fa766609d184efdd811c4b72" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4663474780/" target="_blank">Custom Post Type UI プラグイン</a></div>  <p></p>  <p></p>  <p>Custom Post Type UI プラグインは その名の通り、カスタ投稿タイプを作成するためのプラグインですが、新規追加画面にカスタムタクソノミーを作成する UI も持っています。</p>  <p>こちらに入力することで簡単にカスタムタクソノミーを導入することができます。</p>  <p>項目は以下の通り。</p>  <ul>   <li><strong>Taxonomy Name</strong>: （必須）タクソノミーの名前。コンピュータが読み取れるもの（つまり日本語ではダメ）で、簡潔なものがよいでしょう。 </li>    <li><strong>Label</strong>: タクソノミーのラベル。管理画面に表示される名前です。この内容が日本語であれば、管理画面にも日本語で表示されます。 </li>    <li><strong>Singular Label</strong>: 単数の場合に表示されるラベル。日本語は単語レベルでの単数/複数の区別があまりないので、日本語の場合は不要だと思います。       <br />例）Label に flowers と設定した場合は、こちらに flower と設定します。 </li>    <li><strong>Post Type Name</strong>: （必須）”post”、”page”、”link” またはカスタム投稿タイプを入力します。”post” を入力すれば投稿の新規追加に、”page” を入力すればページの新規追加にカスタムタクソノミーが表示されます。 </li>    <li><strong>hierarchical</strong>: 親子関係を持たせる場合は “True” にします。デフォルト値は “False” です。 </li>    <li><strong>Show UI</strong>: タクソノミーを管理するための UI を作る場合は ”True” にします。デフォルト値は “True” です。 </li>    <li><strong>Query Var</strong>: get_query_var を使って呼び出すクエリ変数の関連項目だと思われますが、利用用途が分かりません。”True” にするとデフォルトの “$taxonomy” が使われます。 </li>    <li><strong>Rewrite</strong>: ”True” を設定すると、Taxonomy Name で指定した値が URL に使われます。 </li>    <li><strong>Custom Rewrite Slug</strong>: URL ベースに Taxonomy Name 以外のスラッグを設定する場合はここに入力します。デフォルトでは Taxonomy Name が使われます。 </li> </ul>  <h3>ソースコードを書く</h3>  <p>使用中のテーマの functions.php に以下のコードを追加することでも使用できるようになります。プラグインなどを作成する場合は、以下のコードを参考にしてみてください。</p>

[php]// カスタムタクソノミーを作成
// create custom taxonomy
function odekon_custom_taxonomies() {  
	register_taxonomy(
		'wordpress_versions',
		'post',
		array(
			'hierarchical' =&gt; true,
			'label' =&gt; 'WordPress Versions',
			'singular_name' =&gt; 'WordPress Version',
			'query_var' =&gt; true,
			'rewrite' =&gt; true
		)
	);
}  
add_action('init', 'odekon_custom_taxonomies', 0);
[/php] 

<h3>カスタムタクソノミーを表示する</h3>

<p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4053/4641692629_b960c4f784.jpg"><img id="thumbcf17475012c22fe143cf52fcac829ee6" title="Click to enlarge" alt="カスタムタクソノミーが表示されていない" src="http://farm5.static.flickr.com/4053/4641692629_b960c4f784.jpg" width="500" height="334" /></a></p>  <div id="caption-for-thumbcf17475012c22fe143cf52fcac829ee6" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4641692629/" target="_blank">カスタムタクソノミーが表示されていない</a></div>  <p>“WordPress Versions” というカスタムタクソノミーを作成し、記事に ”3.0” というカスタムタクソノミーを割り当てて投稿してみましたが、デフォルトの状態ではタグやカテゴリのように表示されません。</p>  <p>そこで、 以下のコードを追加してみました。例として、TwentyTen テーマを使用しましたので、loop.php の</p>

 [php]&lt;div class=&quot;entry-utility&quot;&gt;
	&lt;?php if ( count( get_the_category() ) ) : ?&gt;
		&lt;span class=&quot;cat-links&quot;&gt;
			&lt;span class=&quot;entry-utility-prep entry-utility-prep-cat-links&quot;&gt;&lt;?php printf( __('Posted in %s', 'twentyten' ), '&lt;/span&gt; ' . get_the_category_list( ', ' ) ); ?&gt;
		&lt;/span&gt;
		&lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt;
	&lt;?php endif; ?&gt;
[/php]

<p>という部分の後に、</p>

[php]	&lt;?php
		$taxo_list = get_the_term_list( $post-&gt;ID, 'wordpress_versions', '&lt;strong&gt;WordPress Versions:&lt;/strong&gt; ', ', ', '' );
		if ( $taxo_list ):
	?&gt;
		&lt;span class=&quot;taxo-links&quot;&gt;
			&lt;span class=&quot;entry-utility-prep entry-utility-prep-tag-links&quot;&gt;&lt;?php echo $taxo_list; ?&gt;
		&lt;/span&gt;
		&lt;span class=&quot;meta-sep&quot;&gt;|&lt;/span&gt;
	&lt;?php endif; ?&gt;
[/php]

<p>を追加してみると…</p>

<p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4032/4642303754_34170db858.jpg"><img id="thumba44b03d67e2dc01b619f175edb4ba511" title="Click to enlarge" alt="カスタムタクソノミー、表示されました！" src="http://farm5.static.flickr.com/4032/4642303754_34170db858.jpg" width="500" height="334" /></a></p>  <div id="caption-for-thumba44b03d67e2dc01b619f175edb4ba511" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4642303754/" target="_blank">カスタムタクソノミー、表示されました！</a></div>  <p>うまく行きました！</p><p>&copy; 2012 <a href="http://www.odysseygate.com/" title="Odysseygate.com">Odysseygate.com</a> This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact odysseygate@gmail.com so we can take legal action immediately.</p><p>鼻からカフェモカ。</p>]]></description>
		<wfw:commentRss>http://8bitodyssey.com/archives/1620/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://8bitodyssey.com/archives/1620" />
	</item>
		<item>
		<title>WordPress 3.0 の新機能を見てみよう @ WordBench 川崎</title>
		<link>http://8bitodyssey.com/archives/1565</link>
		<comments>http://8bitodyssey.com/archives/1565#comments</comments>
		<pubDate>Tue, 23 Mar 2010 15:30:00 +0000</pubDate>
		<dc:creator>おで</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[2010]]></category>
		<category><![CDATA[3.0]]></category>
		<category><![CDATA[wordbench]]></category>
		<category><![CDATA[川崎]]></category>
		<category><![CDATA[開発]]></category>

		<guid isPermaLink="false">http://8bitodyssey.com/archives/1565</guid>
		<description><![CDATA[<p><img src="http://www.odysseygate.com/images/pero.jpg" style="float: left; margin: 2px 5px 1px 0px"/></p>
<p>[<a href="http://kawasaki.wordbench.org/2010/03/17/study20100321/" target="_blank">先日の WordBench 川崎</a>でプレゼンした物の再録になります。Version 3.0 のまとめについては、<a href="http://wpdocs.sourceforge.jp/Version_3.0" target="_blank">日本語 Codex</a> が詳しいです。]</p>  <p>Version 3.0 も大分固まってきたようなので、Mac にローカル環境を作るついでに新機能を確認してみました。</p> <span id="more-1565"></span>  <p></p>  <p>まずインストール画面。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4053/4454459950_f9fd017cf2_o.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" id="thumb9e8ff543f78e8fe243fd46c5117f83a2" title="Click to enlarge" border="0" alt="WordPress 3.0 インストール" src="http://farm5.static.flickr.com/4053/4454459950_5881caabf6.jpg" width="500" height="309" /></a></p>  <div id="caption-for-thumb9e8ff543f78e8fe243fd46c5117f83a2" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4454459950/" target="_blank">WordPress 3.0 インストール</a></div>  <p>2.9 まではデフォルトのユーザ名は admin しか選べず、ログインパスワードもランダムの文字列になっていましたが、3.0 からはユーザ名・パスワードを任意に入力できるようになっています。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4063/4453681071_150ced2468_o.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" id="thumbc66a22ee1e902835e0104c248044b694" title="Click to enlarge" border="0" alt="WordPress 3.0 インストール 入力したアカウント情報の決定画面" src="http://farm5.static.flickr.com/4063/4453681071_6120466e0a.jpg" width="500" height="309" /></a></p>  <div id="caption-for-thumbc66a22ee1e902835e0104c248044b694" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4453681071/" target="_blank">WordPress 3.0 インストール 入力したアカウント情報の決定画面</a></div>  <p>たとえば、ぼくのハンドルを入力してみるとこんな感じ。admin 一択よりはセキュアでしょうけど、username には推測されないものを使ったほうがよいと思います(笑)</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4003/4453681331_793166beb3_o.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" id="thumbda4763db016ca303dd1b0ce7e0aeb185" title="Click to enlarge" border="0" alt="WordPress 3.0 管理画面" src="http://farm5.static.flickr.com/4003/4453681331_56013580d1.jpg" width="500" height="309" /></a></p>  <div id="caption-for-thumbda4763db016ca303dd1b0ce7e0aeb185" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4453681331/" target="_blank">WordPress 3.0 管理画面</a></div>  <p>というわけで、ログイン。管理画面にはそれほど大きな変更はありません（現在の状況のところのデザインが見やすくなったり）が、ダッシュボードの下に「Update」メニューが追加されています。WordPress 本体のアップデートはここから行えるようです。</p>  <p>yorozu さんが言っていた Network メニューが見当たらないなぁと思ったら、</p>  <p><code>define('WP_ALLOW_MULTISITE',true);</code></p>  <p>の一文を wp-config.php に追加する必要があったのでした…（Thanx! yorozu さん）。この一文を追加すると…</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm3.static.flickr.com/2749/4452999141_49cc748579_o.png"><img id="thumb5c56db102dd4538fb1cbbce8a20577d3" title="Click to enlarge" alt="スクリーンショット（2010-03-21 1.24.30）" src="http://farm3.static.flickr.com/2749/4452999141_49cc748579_o.png" width="180" height="160" /></a></p>  <div id="caption-for-thumb5c56db102dd4538fb1cbbce8a20577d3" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4452999141/" target="_blank">Network&#160; メニュー出現</a></div>  <p>出ました。出ました。ところが！</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm3.static.flickr.com/2728/4453777068_bdec02be43_o.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" id="thumb1febe5dc38a746a3c6f3fffea46c11f1" title="Click to enlarge" border="0" alt="スクリーンショット（2010-03-21 1.32.03）" src="http://farm3.static.flickr.com/2728/4453777068_be615e3ee9.jpg" width="500" height="309" /></a></p>  <div id="caption-for-thumb1febe5dc38a746a3c6f3fffea46c11f1" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4453777068/" target="_blank">ポート番号があるとネットワークのインストールができません＞＜</a></div>  <p>MAMP を使ったローカル環境ではデフォルトで 8888 ポートを使用するようになっており、このままでは Network 機能（マルチサイト機能）をインストールできません。<ins>ポート番号の他に 127.0.0.1 もダメみたいです（Thx! <a href="http://bono.s206.xrea.com/" target="_blank">ぼののん</a>) </ins></p>  <p>MAMP のポートを 80 番に変更してもなぜか 8888 番を見に行ってしまったので（ぼくのやり方が悪いのかもしれませんが）、Windows のローカル環境で改めて試してみました。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4028/4452999789_d5236e82c2_o.png"><img id="thumbf9700aa41f6affcc65c6b81a54e054da" title="Click to enlarge" alt="WordPress マルチサイトのネットワーク作成" src="http://farm5.static.flickr.com/4028/4452999789_f1430b7b89.jpg" width="500" height="297" /></a></p>  <div id="caption-for-thumbf9700aa41f6affcc65c6b81a54e054da" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4452999789/" target="_blank">WordPress マルチサイトのネットワーク作成</a></div>  <p>Windows + Xampp 環境ではポート番号なし localhost で接続していたので、今度はうまくいきました。Network Title と admin のeメールアドレスを入力して Install です。</p>  <p>&#160;</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4033/4453777722_6e4fbc171d_o.png"><img style="display: inline; margin-left: 0px; margin-right: 0px" id="thumb1f4ad33f94e219ee0791dab0a9a04977" title="Click to enlarge" alt="WordPress マルチサイトのネットワーク作成に必要な操作" src="http://farm5.static.flickr.com/4033/4453777722_60d6e6716b.jpg" width="500" height="297" /></a></p>  <div id="caption-for-thumb1f4ad33f94e219ee0791dab0a9a04977" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4453777722/" target="_blank">WordPress マルチサイトのネットワーク作成に必要な操作</a></div>  <p>wp-content に blogs.dir ディレクトリを作成し、wp-config.php と .htaccess に表示された内容を追加してやると…</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4052/4452999833_867d585819_o.png"><img id="thumb1b23f0b433c1bcd6b51ff455d457a2d5" title="Click to enlarge" alt="マルチサイト化した WordPress・SuperAdminメニュー" src="http://farm5.static.flickr.com/4052/4452999833_702a54ef50.jpg" width="500" height="297" /></a></p>  <div id="caption-for-thumb1b23f0b433c1bcd6b51ff455d457a2d5" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4452999833/" target="_blank">マルチサイト化した WordPress・SuperAdminメニュー</a></div>  <p>ダッシュボードメニューの上に Super Admin メニューが追加されました。マルチサイト化（MU化）完了です。</p>  <p>続いて、新テーマ「Twenty Ten（2010）」。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4050/4452999699_9fb7005f4c_o.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" id="thumbca199558c4834237fe15925c1214d573" title="Click to enlarge" border="0" alt="Twenty Ten Theme" src="http://farm5.static.flickr.com/4050/4452999699_12ac6c0cf3.jpg" width="500" height="309" /></a></p>  <div id="caption-for-thumbca199558c4834237fe15925c1214d573" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4452999699/" target="_blank">Twenty Ten Theme</a></div>  <p>鳴り物入りで登場する（予定の）Kubric に変わる新しいテーマです。オーソドックスなデザインの2カラムテーマになっていて、</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm3.static.flickr.com/2692/4452999577_0420c76745_o.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" id="thumba4629e90c6b4e736b3854bc56f0d71a4" title="Click to enlarge" border="0" alt="スクリーンショット（2010-03-20 19.44.16）" src="http://farm3.static.flickr.com/2692/4452999577_54219161cd.jpg" width="500" height="309" /></a></p>  <div id="caption-for-thumba4629e90c6b4e736b3854bc56f0d71a4" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4452999577/" target="_blank">ヘッダー画像の選択</a></div>  <p>ヘッダー画像はあらかじめいくつか用意されているものから選ぶことも、自分で用意した画像をアップロードして使用することもできます。</p>  <p>また、投稿サムネイル機能を使って、投稿ページごとにヘッダー画像を変えることもできるようになっています（Thanx! yorozu さん）。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4070/4452999437_7e2fae3e64_o.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" id="thumb1b265ded2ff9958f6dd0bd5600f7eead" title="Click to enlarge" border="0" alt="ウィジェット画面" src="http://farm5.static.flickr.com/4070/4452999437_ef7a29acfb.jpg" width="500" height="309" /></a></p>  <div id="caption-for-thumb1b265ded2ff9958f6dd0bd5600f7eead" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4452999437/" target="_blank">ウィジェット画面</a></div>  <p>サイドバーには Primary と Secondary の二つのウィジェットエリア、フッターには4つのフッターウィジェットエリアが用意されていて、2カラムデザインにも、1カラムでぶら下がりのデザインにもソースコードをいじることなく対応できるようになっています。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm3.static.flickr.com/2692/4452999265_049ce15b68_o.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" id="thumb6941cec23c33c1f4551ac3d51e6d4da8" title="Click to enlarge" border="0" alt="背景画像のアップロード" src="http://farm3.static.flickr.com/2692/4452999265_dca412dc22.jpg" width="500" height="309" /></a></p>  <div id="caption-for-thumb6941cec23c33c1f4551ac3d51e6d4da8" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4452999265/" target="_blank">背景画像のアップロード</a></div>  <p></p>  <p>こちらはカスタム背景画像の設定ページ。背景画像の変更も、CSS やテーマファイルの変更要らずです。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm5.static.flickr.com/4025/4452999321_1fdd17f312_o.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" id="thumbabbf7add1066ef92ec8924d4b296f8a3" title="Click to enlarge" border="0" alt="カスタムメニュー画面" src="http://farm5.static.flickr.com/4025/4452999321_40dff510e8.jpg" width="500" height="309" /></a></p>  <div id="caption-for-thumbabbf7add1066ef92ec8924d4b296f8a3" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4452999321/" target="_blank">カスタムメニュー画面</a></div>  <p>こちらはカスタムメニュー設定ページ。専用のナビゲーションメニューを作ることができ、既存のページを並べることも、特定のURLへのリンクを作ることもできます。</p>  <p><a class="highslide" onclick="return hs.expand(this)" href="http://farm3.static.flickr.com/2724/4452999371_b8a0f6bdf3_o.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" id="thumbe6a0b2b47b17787a61030358d2e55100" title="Click to enlarge" border="0" alt="カスタムメニュー非対応テーマでは使えません" src="http://farm3.static.flickr.com/2724/4452999371_ddbcac5bc8.jpg" width="500" height="309" /></a></p>  <div id="caption-for-thumbe6a0b2b47b17787a61030358d2e55100" class="highslide-caption"><a title="go 2 flickr" href="http://www.flickr.com/photos/odysseygate/4452999371/" target="_blank">カスタムメニュー非対応テーマでは使えません</a></div>  <p>試しに WordPress Default に切り替えてみると、エラーが出てしまいます。カスタムメニューをサポートしたテーマでなければ使えないようです。</p>  <p>続いてテーマの構造を見てみましょう。</p> <iframe height="330" src="https://cacoo.com/diagrams/Ghp1fZLUXXFjNvE3/view" frameborder="0" width="402" scrolling="no"></iframe>  <p>ぼくはテーマデザインをするとき、構造を把握しやすいようにワイヤーフレームをよく書きます。Twenty Ten の index のワイヤーフレームは上の図のようになります。</p>  <p>DTD宣言は &lt;!DOCTYPE html&gt; となっており、HTML 5 を意識しているみたいです。ただし、その後は XHTML として書かれているようです。</p>  <p>header、main、footer と大きく3つに分けられているようですね。不思議なのは、エントリのタイトルには h2 タグが出てくるのですが、h1 が見当たりません。</p>  <p>シングルページになるとエントリのタイトルが h1 になるようになっていたりします。たぶん、まだ開発中なんでしょうね。5月のリリース時にはもっとちゃんとすることでしょう。ちょっとこのテーマ気に入ってきました。子テーマ作ってみようかな。</p>  <p>ということで、今回のプレゼンはここまで。最後まで読んでくださった方、お付き合いありがとうございました～。</p><p>&copy; 2012 <a href="http://www.odysseygate.com/" title="Odysseygate.com">Odysseygate.com</a> This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact odysseygate@gmail.com so we can take legal action immediately.</p><p>鼻からカフェモカ。</p>]]></description>
		<wfw:commentRss>http://8bitodyssey.com/archives/1565/feed</wfw:commentRss>
		<slash:comments>13</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://8bitodyssey.com/archives/1565" />
	</item>
	</channel>
</rss>

