<?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>WordPress for EXE-eStyle &#187; themes</title>
	<atom:link href="http://www.exe1993.jp/wpbusiness/archives/category/themes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.exe1993.jp/wpbusiness</link>
	<description>WEBシステムの開発、WordPressコンサルタント、多彩なシステム開発やサイト構築に挑戦する株式会社エグゼのWebサイトです。</description>
	<lastBuildDate>Wed, 03 Mar 2010 02:35:59 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.exe1993.jp/wpbusiness/archives/category/themes/feed/" />
		<item>
		<title>category.php</title>
		<link>http://www.exe1993.jp/wpbusiness/archives/category_php/</link>
		<comments>http://www.exe1993.jp/wpbusiness/archives/category_php/#comments</comments>
		<pubDate>Sun, 03 May 2009 08:23:31 +0000</pubDate>
		<dc:creator>ykanazawa</dc:creator>
				<category><![CDATA[themes]]></category>
		<category><![CDATA[wordpress_themes]]></category>

		<guid isPermaLink="false">http://www.exe1993.jp/wpbusiness/?p=1344</guid>
		<description><![CDATA[投稿記事に付けられる「カテゴリー」属性によって、分類表示する時に利用されるテンプレートファイルです。通常は「カテゴリー」に属する投稿記事が日付順に表示されます。 ブログでは「カテゴリー」属性別の表示は多用されていて、とて [...]]]></description>
			<content:encoded><![CDATA[<p>投稿記事に付けられる「カテゴリー」属性によって、分類表示する時に利用されるテンプレートファイルです。通常は「カテゴリー」に属する投稿記事が日付順に表示されます。</p>
<p>ブログでは「カテゴリー」属性別の表示は多用されていて、とても一般的です。テーマの中に「category.php」がない場合はテーマ内の「archive.php」が、「archive.php」がない場合は「index.php」が代行します。（<a href="http://www.exe1993.jp/wpbusiness/?p=986">テンプレートファイルの階層</a>）</p>
<p>「カテゴリー」別にテンプレートを分けたい場合はファイル名をID別の表記（category-xxx.php)にすることで、分類することができます。</p>
<p>＊「Default_Theme（英語版）」の「アーカイブテンプレート（archive.php）」を修正して、「category.php」を制作してみましょう。</p>
<h4>category.php 例</h4>
<pre class="brush: php; title: ;">

&lt;?phpget_header();?&gt;          //インクルードファイル：header.phpを読み込みます

	&lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot;&gt;

		&lt;?php if (have_posts()) : ?&gt;     //属性別の条件式の開始

 	  &lt;?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?&gt;

      //カテゴリータイトル表示
		&lt;h2 class=&quot;pagetitle&quot;&gt;Archive for the ‘&lt;?php single_cat_title(); ?&gt;’ Category&lt;/h2&gt;

      //投稿前後のナビゲーションの表示
		&lt;div class=&quot;navigation&quot;&gt;
			&lt;div class=&quot;alignleft&quot;&gt;&lt;?php next_posts_link('? Older Entries') ?&gt;&lt;/div&gt;
			&lt;div class=&quot;alignright&quot;&gt;&lt;?php previous_posts_link('Newer Entries ?') ?&gt;&lt;/div&gt;
		&lt;/div&gt;

		&lt;?php while (have_posts()) : the_post(); ?&gt; //コンテンツデータを取得する・ループのPHPコードの開始
		  &lt;div &lt;?php post_class() ?&gt;&gt;

                //投稿（コンテンツ）タイトル名の表示
				&lt;h3 id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title_attribute(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
				&lt;small&gt;&lt;?php the_time('l, F jS, Y') ?&gt;&lt;/small&gt;

                //投稿（コンテンツ）内容の表示
				&lt;div class=&quot;entry&quot;&gt;
					&lt;?php the_content() ?&gt;
				&lt;/div&gt;

                //投稿タグ・カテゴリー・編集リンク・コメントの表示
				&lt;p class=&quot;postmetadata&quot;&gt;&lt;?php the_tags('Tags: ', ', ', '&lt;br /&gt;'); ?&gt; Posted in &lt;?php the_category(', ') ?&gt; | &lt;?php edit_post_link('Edit', '', ' | '); ?&gt;  &lt;?php comments_popup_link('No Comments ?', '1 Comment ?', '% Comments ?'); ?&gt;&lt;/p&gt;
			&lt;/div&gt;

		&lt;?php endwhile; else： ?&gt;          //コンテンツデータを取得する・ループのPHPコードの終了

    //コンテンツデータがないときのメッセージ表示
		&lt;h2 class='center'&gt;Sorry, but there aren't any posts in the %s category yet.&lt;/h2&gt;

	  &lt;? php endif; ?&gt;           //属性別の条件式の終了

        //投稿前後のナビゲーションの表示
		&lt;div class=&quot;navigation&quot;&gt;
			&lt;div class=&quot;alignleft&quot;&gt;&lt;?php next_posts_link('? Older Entries') ?&gt;&lt;/div&gt;
			&lt;div class=&quot;alignright&quot;&gt;&lt;?php previous_posts_link('Newer Entries ?') ?&gt;&lt;/div&gt;
		&lt;/div&gt;
	&lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;          //インクルードファイル：sideber.phpを読み込みます

&lt;?php get_footer(); ?&gt;          //インクルードファイル：footer.phpを読み込みます
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.exe1993.jp/wpbusiness/archives/category_php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.exe1993.jp/wpbusiness/archives/category_php/" />
	</item>
		<item>
		<title>home.php</title>
		<link>http://www.exe1993.jp/wpbusiness/archives/home_php/</link>
		<comments>http://www.exe1993.jp/wpbusiness/archives/home_php/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 08:19:47 +0000</pubDate>
		<dc:creator>ykanazawa</dc:creator>
				<category><![CDATA[themes]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[wordpress_themes]]></category>

		<guid isPermaLink="false">http://www.exe1993.jp/wpbusiness/?p=1307</guid>
		<description><![CDATA[WordPressをCMSとして利用して、Webサイト構築をする場合、TOPページ（フロントページ）用のテンプレートファイルが「home.php」です。テーマの中に「home.php」がある場合はサイト表示の際、最初に表 [...]]]></description>
			<content:encoded><![CDATA[<p>WordPressをCMSとして利用して、Webサイト構築をする場合、TOPページ（フロントページ）用のテンプレートファイルが「home.php」です。テーマの中に「home.php」がある場合はサイト表示の際、最初に表示され、ない場合はテーマ内の「index.php」が代行します。（<a href="http://www.exe1993.jp/wpbusiness/?p=986">テンプレートファイルの階層</a>）</p>
<p>ブログの場合、TOPページのメインコンテンツは投稿記事の時系列的な配列がほとんどですが、一般的なWebサイトの場合はそうともかぎりません。サイトの説明、サイト内容に合った画像や動画など、訴求性を持ったレイアウトが必要になります。その際、自由にデザインできるようにTOPページ用に用意されたテンプレートファイルが「home.php」です。</p>
<p>また、「home.php」を利用しなくても、「設定」－「表示設定」で「フロントページの表示」の設定をおこなえば、「<a href="http://www.exe1993.jp/wpbusiness/?p=1013">ページテンプレートファイル</a>」で作成したページコンテンツを使用することもできます。その場合、TOPページ（フロントページ）用のページを用意して、利用するので、「home.php」は必要としません。</p>
<div class="point">
TOPページ表示を「home.php」を使用するか、「index.php」で代行するか、また、「フロントページの表示」でTOPページを表示させるかはテーマ制作者、管理者とよく協議して決めましょう。いづれにしろ、分かりやすく、維持しやすく、変更も簡便な形式が重要です。
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.exe1993.jp/wpbusiness/archives/home_php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.exe1993.jp/wpbusiness/archives/home_php/" />
	</item>
		<item>
		<title>スクリーンショット（screenshot.png）</title>
		<link>http://www.exe1993.jp/wpbusiness/archives/screenshot_png/</link>
		<comments>http://www.exe1993.jp/wpbusiness/archives/screenshot_png/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 05:46:46 +0000</pubDate>
		<dc:creator>ykanazawa</dc:creator>
				<category><![CDATA[themes]]></category>
		<category><![CDATA[wordpress_themes]]></category>

		<guid isPermaLink="false">http://www.exe1993.jp/wpbusiness/?p=1285</guid>
		<description><![CDATA[WordPressテーマ選択の画面で（「外観」－「テーマの管理」）で、サムネイル画像を表示するファイルが「スクリーンショット（screenshot.png）」です。 また、サムネイル画像とともに、表示される「テーマの説明 [...]]]></description>
			<content:encoded><![CDATA[<p>WordPressテーマ選択の画面で（「外観」－「テーマの管理」）で、サムネイル画像を表示するファイルが「スクリーンショット（screenshot.png）」です。</p>
<p>また、サムネイル画像とともに、表示される「テーマの説明」は「スタイルシート （style.css）」に記述された「<a href="http://www.exe1993.jp/wpbusiness/?p=750"target="_blank">テーマ説明（コメントヘッダ）</a>」で、「テーマの画像」と同じく、テーマ選択の目印になります。当然ですが、「スクリーンショット（screenshot.png）」がなければ、サムネイル表示はなく、「テーマ説明（コメントヘッダ）」がなければ、「テーマの説明」もなく、選択が不明瞭なものになってしまいます。</p>
<p>「スクリーンショット（screenshot.png）」は<a href="http://ja.wikipedia.org/wiki/Portable_Network_Graphics"target="_blank">PNGフォーマット</a>で、３００ ｘ ２２６ピクセルの大きさで作成し、テーマフォルダの中に保存します。テーマフォルダの中にscreenshot.pngがあると、WordPressは自動的に読取り、「外観」－「テーマの管理」で表示できるようになります。</p>
<div id="attachment_1300" class="wp-caption aligncenter" style="width: 310px"><img src="http://www.exe1993.jp/wpbusiness/wp-content/uploads/screenshot.png" alt="screenshot表示例" title="screenshot" width="300" height="225" class="size-full wp-image-1300" /><p class="wp-caption-text">screenshot.png実物画像サンプル（300x226）</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.exe1993.jp/wpbusiness/archives/screenshot_png/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.exe1993.jp/wpbusiness/archives/screenshot_png/" />
	</item>
		<item>
		<title>Default／comments.php</title>
		<link>http://www.exe1993.jp/wpbusiness/archives/default_comments_php/</link>
		<comments>http://www.exe1993.jp/wpbusiness/archives/default_comments_php/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 08:57:43 +0000</pubDate>
		<dc:creator>ykanazawa</dc:creator>
				<category><![CDATA[themes]]></category>
		<category><![CDATA[wordpress_themes]]></category>

		<guid isPermaLink="false">http://www.exe1993.jp/wpbusiness/?p=1044</guid>
		<description><![CDATA[ブログ記事に対して、関連した意見、注釈などを投稿することを「コメント（comments）」といいます。コメント欄は通常、「記事用テンプレート（single.php）」を使った、投稿記事ページに表示されますが、その他のペー [...]]]></description>
			<content:encoded><![CDATA[<p>ブログ記事に対して、関連した意見、注釈などを投稿することを「コメント（comments）」といいます。コメント欄は通常、「記事用テンプレート（single.php）」を使った、投稿記事ページに表示されますが、その他のページでも、コメント欄を追加することもあります。また、「トラックバックURL」や「コメントフォーム」のなどの記述もあるため、パーツテンプレート化しておくほうが便利です。</p>
<p>「コメントテンプレート（comments.php）はテンプレートタグの〈?php comments_template(); ?〉を記述することで、各テンプレートファイルに読み込まれます。</p>
<div class="point">
もしテーマ内にcomments.phpがない場合は「Defaultテーマ」のcomments.phpが呼び出されて代用するようになっています。もちろん、wp-contents/themes/の中に「Defaultテーマ」がない場合は表示されません。
</div>
<h4>Default_Theme／comments.php</h4>
<pre class="brush: php; title: ;">
&lt;?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */

// Do not delete these lines
	if (!empty($_SERVER['SCRIPT_FILENAME']) &amp;amp;&amp;amp; 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
		die ('Please do not load this page directly. Thanks!');

	if ( post_password_required() ) { ?&gt;
		&lt;p class=&quot;nocomments&quot;&gt;This post is password protected. Enter the password to view comments.&lt;/p&gt;
	&lt;?php
		return;
	}
?&gt;

&lt;!-- You can start editing here. --&gt;

//コメントが許可されていて、ある場合の表示
&lt;?php if ( have_comments() ) : ?&gt;
	&lt;h3 id=&quot;comments&quot;&gt;&lt;?php comments_number('No Responses', 'One Response', '% Responses' );?&gt; to “&lt;?php the_title(); ?&gt;”&lt;/h3&gt;

	&lt;div class=&quot;navigation&quot;&gt;
		&lt;div class=&quot;alignleft&quot;&gt;&lt;?php previous_comments_link() ?&gt;&lt;/div&gt;
		&lt;div class=&quot;alignright&quot;&gt;&lt;?php next_comments_link() ?&gt;&lt;/div&gt;
	&lt;/div&gt;

	&lt;ol class=&quot;commentlist&quot;&gt;
	&lt;?php wp_list_comments(); ?&gt;
	&lt;/ol&gt;

	&lt;div class=&quot;navigation&quot;&gt;
		&lt;div class=&quot;alignleft&quot;&gt;&lt;?php previous_comments_link() ?&gt;&lt;/div&gt;
		&lt;div class=&quot;alignright&quot;&gt;&lt;?php next_comments_link() ?&gt;&lt;/div&gt;
	&lt;/div&gt;
 &lt;?php else : // this is displayed if there are no comments so far ?&gt;

//コメント投稿が許可されていない場合の表示
	&lt;?php if ('open' == $post-&gt;comment_status) : ?&gt;
		&lt;!-- If comments are open, but there are no comments. --&gt;

	 &lt;?php else : // comments are closed ?&gt;
		&lt;!-- If comments are closed. --&gt;
		&lt;p class=&quot;nocomments&quot;&gt;Comments are closed.&lt;/p&gt;

	&lt;?php endif; ?&gt;
&lt;?php endif; ?&gt;

//コメントが許可されていて、ある場合の表示
&lt;?php if ('open' == $post-&gt;comment_status) : ?&gt;

&lt;div id=&quot;respond&quot;&gt;

&lt;h3&gt;&lt;?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?&gt;&lt;/h3&gt;

&lt;div class=&quot;cancel-comment-reply&quot;&gt;
	&lt;small&gt;&lt;?php cancel_comment_reply_link(); ?&gt;&lt;/small&gt;
&lt;/div&gt;

&lt;?php if ( get_option('comment_registration') &amp;amp;&amp;amp; !$user_ID ) : ?&gt;
&lt;p&gt;You must be &lt;a href=&quot;&lt;?php echo get_option('siteurl'); ?&gt;/wp-login.php?redirect_to=&lt;?php echo urlencode(get_permalink()); ?&gt;&quot;&gt;logged in&lt;/a&gt; to post a comment.&lt;/p&gt;
&lt;?php else : ?&gt;

&lt;form action=&quot;&lt;?php echo get_option('siteurl'); ?&gt;/wp-comments-post.php&quot; method=&quot;post&quot; id=&quot;commentform&quot;&gt;

&lt;?php if ( $user_ID ) : ?&gt;

&lt;p&gt;Logged in as &lt;a href=&quot;&lt;?php echo get_option('siteurl'); ?&gt;/wp-admin/profile.php&quot;&gt;&lt;?php echo $user_identity; ?&gt;&lt;/a&gt;. &lt;a href=&quot;&lt;?php echo wp_logout_url(get_permalink()); ?&gt;&quot; title=&quot;Log out of this account&quot;&gt;Log out ?&lt;/a&gt;&lt;/p&gt;

&lt;?php else : ?&gt;

//コメント欄の表示
&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;author&quot; id=&quot;author&quot; value=&quot;&lt;?php echo $comment_author; ?&gt;&quot; size=&quot;22&quot; tabindex=&quot;1&quot; &lt;?php if ($req) echo &quot;aria-required='true'&quot;; ?&gt; /&gt;
&lt;label for=&quot;author&quot;&gt;&lt;small&gt;Name &lt;?php if ($req) echo &quot;(required)&quot;; ?&gt;&lt;/small&gt;&lt;/label&gt;&lt;/p&gt;

&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;email&quot; id=&quot;email&quot; value=&quot;&lt;?php echo $comment_author_email; ?&gt;&quot; size=&quot;22&quot; tabindex=&quot;2&quot; &lt;?php if ($req) echo &quot;aria-required='true'&quot;; ?&gt; /&gt;
&lt;label for=&quot;email&quot;&gt;&lt;small&gt;Mail (will not be published) &lt;?php if ($req) echo &quot;(required)&quot;; ?&gt;&lt;/small&gt;&lt;/label&gt;&lt;/p&gt;

&lt;p&gt;&lt;input type=&quot;text&quot; name=&quot;url&quot; id=&quot;url&quot; value=&quot;&lt;?php echo $comment_author_url; ?&gt;&quot; size=&quot;22&quot; tabindex=&quot;3&quot; /&gt;
&lt;label for=&quot;url&quot;&gt;&lt;small&gt;Website&lt;/small&gt;&lt;/label&gt;&lt;/p&gt;

&lt;?php endif; ?&gt;

&lt;!--&lt;p&gt;&lt;small&gt;&lt;strong&gt;XHTML:&lt;/strong&gt; You can use these tags: &lt;code&gt;&lt;?php echo allowed_tags(); ?&gt;&lt;/code&gt;&lt;/small&gt;&lt;/p&gt;--&gt;

&lt;p&gt;&lt;textarea name=&quot;comment&quot; id=&quot;comment&quot; cols=&quot;100%&quot; rows=&quot;10&quot; tabindex=&quot;4&quot;&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.exe1993.jp/wpbusiness/archives/default_comments_php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.exe1993.jp/wpbusiness/archives/default_comments_php/" />
	</item>
		<item>
		<title>Default／footer.php</title>
		<link>http://www.exe1993.jp/wpbusiness/archives/default_footer_php/</link>
		<comments>http://www.exe1993.jp/wpbusiness/archives/default_footer_php/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 17:54:49 +0000</pubDate>
		<dc:creator>ykanazawa</dc:creator>
				<category><![CDATA[themes]]></category>
		<category><![CDATA[wordpress_themes]]></category>

		<guid isPermaLink="false">http://www.exe1993.jp/wpbusiness/?p=1042</guid>
		<description><![CDATA[Webサイトのフッター用の「パーツファイル」が「footer.php」です。テンプレートタグの〈?php get_footer(); ?〉を記述することで、各テンプレートファイルに読み込まれます。 ＊「Default_T [...]]]></description>
			<content:encoded><![CDATA[<p>Webサイトのフッター用の「パーツファイル」が「footer.php」です。テンプレートタグの〈?php get_footer(); ?〉を記述することで、各テンプレートファイルに読み込まれます。</p>
<p>＊「Default_Theme（英語版）」の「footer.php」をコメント文（//説明文）を使って機能解説してみましょう。</p>
<h4>Default_Theme／footer.php</h4>
<pre class="brush: php; title: ;">
&lt;?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */
?&gt;

&lt;hr /&gt;
&lt;div id=&quot;footer&quot;&gt;
&lt;!-- If you'd like to support WordPress, having the &quot;powered by&quot; link somewhere on your blog is the best way; it's our only promotion or advertising. --&gt;
	&lt;p&gt;

     //WordPress情報へのリンク
		&lt;?php bloginfo('name'); ?&gt; is proudly powered by
		&lt;a href=&quot;http://wordpress.org/&quot;&gt;WordPress&lt;/a&gt;

     //RSS情報へのリンク
		&lt;br /&gt;&lt;a href=&quot;&lt;?php bloginfo('rss2_url'); ?&gt;&quot;&gt;Entries (RSS)&lt;/a&gt;
		and &lt;a href=&quot;&lt;?php bloginfo('comments_rss2_url'); ?&gt;&quot;&gt;Comments (RSS)&lt;/a&gt;.
		&lt;!-- &lt;?php echo get_num_queries(); ?&gt; queries. &lt;?php timer_stop(1); ?&gt; seconds. --&gt;
	&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;

//テーマ作成者（感謝！！）表示
&lt;!-- Gorgeous design by Michael Heilemann - http://binarybonsai.com/kubrick/ --&gt;
&lt;?php /* &quot;Just what do you think you're doing Dave?&quot; */ ?&gt;

		&lt;?php wp_footer(); ?&gt;        //プラグイン・関数ファイルに対してのフック
&lt;/body&gt;
&lt;/html&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.exe1993.jp/wpbusiness/archives/default_footer_php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.exe1993.jp/wpbusiness/archives/default_footer_php/" />
	</item>
		<item>
		<title>Default／sidebar.php</title>
		<link>http://www.exe1993.jp/wpbusiness/archives/default_sidebar_php/</link>
		<comments>http://www.exe1993.jp/wpbusiness/archives/default_sidebar_php/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 17:14:14 +0000</pubDate>
		<dc:creator>ykanazawa</dc:creator>
				<category><![CDATA[themes]]></category>
		<category><![CDATA[wordpress_themes]]></category>

		<guid isPermaLink="false">http://www.exe1993.jp/wpbusiness/?p=1040</guid>
		<description><![CDATA[Webサイトのサイドバー用の「パーツファイル」が「sidebar.php」です。テンプレートタグの〈?php get_sidebar(); ?〉を記述することで、各テンプレートファイルに読み込まれます。 また、「side [...]]]></description>
			<content:encoded><![CDATA[<p>Webサイトのサイドバー用の「パーツファイル」が「sidebar.php」です。テンプレートタグの〈?php get_sidebar(); ?〉を記述することで、各テンプレートファイルに読み込まれます。</p>
<p>また、「sidebar.php」は「ウィジェット(Widget)」用の「パーツファイル」として使用することができます。</p>
<p>「ウィジェット(Widget)」はWordPress本体に組み込まれた機能で、管理画面の「外観」－「ウィジェット」画面で、配置を選択すると、「フィード表示」「最近の投稿」「カレンダー」などの機能が使用できるようになります。</p>
<p>「ウィジェット(Widget)」を使用できるテーマにはsidebar.phpとfunctions.php（関数ファイル）に「ウィジェット対応用コード」が必要になります。</p>
<h4>ウィジェット対応用コード（functions.php）</h4>
<p>＊ウィジェットの前後に〈li〉〈/li〉を入れ、タイトルを〈h2〉にする場合</p>
<pre class="brush: php; title: ;">
if ( function_exists('register_sidebar') )
    register_sidebar(array(

        'before_widget' =&gt; '&lt;li id=&quot;%1$s&quot; class=&quot;widget %2$s&quot;&gt;',
        'after_widget' =&gt; '&lt;/li&gt;',
        'before_title' =&gt; '&lt;h2 class=&quot;widgettitle&quot;&gt;',
        'after_title' =&gt; '&lt;/h2&gt;',

    ));
</pre>
<h4>ウィジェット対応用コード（sidebar.php）</h4>
<pre class="brush: php; title: ;">
&lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?&gt;

// ウィジェットがない場合のサイドバー表示

&lt;?php endif; ?&gt;
</pre>
<p>＊「Default_Theme（英語版）」の「サイドバーテンプレート（sidebar.php）」をコメント文（//説明文）を使って機能解説してみましょう。</p>
<h4>Default_Theme／sidebar.php</h4>
<pre class="brush: php; title: ;">
&lt;?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */
?&gt;
	&lt;div id=&quot;sidebar&quot;&gt;
		&lt;ul&gt;

      //ウィジェット対応用コード（sidebar.php）開始
			&lt;?php 	/* Widgetized sidebar, if you have the plugin installed. */
					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?&gt;

      // 以下、ウィジェットがない場合のサイドバー表示
			&lt;li&gt;
				&lt;?php get_search_form(); ?&gt;      // 検索表示
			&lt;/li&gt;

			&lt;!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
			&lt;li&gt;&lt;h2&gt;Author&lt;/h2&gt;
			&lt;p&gt;A little something about you, the author. Nothing lengthy, just an overview.&lt;/p&gt;
			&lt;/li&gt;
			--&gt;

      // アーカイブ（404、カテゴリー他）の場合の条件でのサイドバーコメント表示
			&lt;?php if ( is_404() || is_category() || is_day() || is_month() ||
						is_year() || is_search() || is_paged() ) {
			?&gt; &lt;li&gt;

			&lt;?php /* If this is a 404 page */ if (is_404()) { ?&gt;
			&lt;?php /* If this is a category archive */ } elseif (is_category()) { ?&gt;
			&lt;p&gt;You are currently browsing the archives for the &lt;?php single_cat_title(''); ?&gt; category.&lt;/p&gt;

			&lt;?php /* If this is a yearly archive */ } elseif (is_day()) { ?&gt;
			&lt;p&gt;You are currently browsing the &lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;/&quot;&gt;&lt;?php echo bloginfo('name'); ?&gt;&lt;/a&gt; blog archives
			for the day &lt;?php the_time('l, F jS, Y'); ?&gt;.&lt;/p&gt;

			&lt;?php /* If this is a monthly archive */ } elseif (is_month()) { ?&gt;
			&lt;p&gt;You are currently browsing the &lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;/&quot;&gt;&lt;?php echo bloginfo('name'); ?&gt;&lt;/a&gt; blog archives
			for &lt;?php the_time('F, Y'); ?&gt;.&lt;/p&gt;

			&lt;?php /* If this is a yearly archive */ } elseif (is_year()) { ?&gt;
			&lt;p&gt;You are currently browsing the &lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;/&quot;&gt;&lt;?php echo bloginfo('name'); ?&gt;&lt;/a&gt; blog archives
			for the year &lt;?php the_time('Y'); ?&gt;.&lt;/p&gt;

			&lt;?php /* If this is a monthly archive */ } elseif (is_search()) { ?&gt;
			&lt;p&gt;You have searched the &lt;a href=&quot;&lt;?php echo bloginfo('url'); ?&gt;/&quot;&gt;&lt;?php echo bloginfo('name'); ?&gt;&lt;/a&gt; blog archives
			for &lt;strong&gt;'&lt;?php the_search_query(); ?&gt;'&lt;/strong&gt;. If you are unable to find anything in these search results, you can try one of these links.&lt;/p&gt;

			&lt;?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) &amp;amp;&amp;amp; !empty($_GET['paged'])) { ?&gt;
			&lt;p&gt;You are currently browsing the &lt;a href=&quot;&lt;?php echo bloginfo('url'); ?&gt;/&quot;&gt;&lt;?php echo bloginfo('name'); ?&gt;&lt;/a&gt; blog archives.&lt;/p&gt;

			&lt;?php } ?&gt;

			&lt;/li&gt; &lt;?php }?&gt;

      // 固定ページタイトル、リンクの表示
			&lt;?php wp_list_pages('title_li=&lt;h2&gt;Pages&lt;/h2&gt;' ); ?&gt;

      // アーカイブ（月別）リンクの表示
			&lt;li&gt;&lt;h2&gt;Archives&lt;/h2&gt;
				&lt;ul&gt;
				&lt;?php wp_get_archives('type=monthly'); ?&gt;
				&lt;/ul&gt;
			&lt;/li&gt;

      // カテゴリータイトル、リンクの表示
			&lt;?php wp_list_categories('show_count=1&amp;amp;title_li=&lt;h2&gt;Categories&lt;/h2&gt;'); ?&gt;

      // ブックマークリンクの表示
			&lt;?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?&gt;
				&lt;?php wp_list_bookmarks(); ?&gt;

      // サイト情報（ログイン、リンク情報）の表示
				&lt;li&gt;&lt;h2&gt;Meta&lt;/h2&gt;
				&lt;ul&gt;
					&lt;?php wp_register(); ?&gt;
					&lt;li&gt;&lt;?php wp_loginout(); ?&gt;&lt;/li&gt;
					&lt;li&gt;&lt;a href=&quot;http://validator.w3.org/check/referer&quot; title=&quot;This page validates as XHTML 1.0 Transitional&quot;&gt;Valid &lt;abbr title=&quot;eXtensible HyperText Markup Language&quot;&gt;XHTML&lt;/abbr&gt;&lt;/a&gt;&lt;/li&gt;
					&lt;li&gt;&lt;a href=&quot;http://gmpg.org/xfn/&quot;&gt;&lt;abbr title=&quot;XHTML Friends Network&quot;&gt;XFN&lt;/abbr&gt;&lt;/a&gt;&lt;/li&gt;
					&lt;li&gt;&lt;a href=&quot;http://wordpress.org/&quot; title=&quot;Powered by WordPress, state-of-the-art semantic personal publishing platform.&quot;&gt;WordPress&lt;/a&gt;&lt;/li&gt;

					&lt;?php wp_meta(); ?&gt;      // サイドバー用のフック
				&lt;/ul&gt;
				&lt;/li&gt;
			&lt;?php } ?&gt;

			&lt;?php endif; ?&gt;      //ウィジェット対応用コード（sidebar.php）終了
		&lt;/ul&gt;
	&lt;/div&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.exe1993.jp/wpbusiness/archives/default_sidebar_php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.exe1993.jp/wpbusiness/archives/default_sidebar_php/" />
	</item>
		<item>
		<title>Default／header.php</title>
		<link>http://www.exe1993.jp/wpbusiness/archives/default_header_php/</link>
		<comments>http://www.exe1993.jp/wpbusiness/archives/default_header_php/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 08:47:57 +0000</pubDate>
		<dc:creator>ykanazawa</dc:creator>
				<category><![CDATA[themes]]></category>
		<category><![CDATA[wordpress_themes]]></category>

		<guid isPermaLink="false">http://www.exe1993.jp/wpbusiness/?p=1024</guid>
		<description><![CDATA[「パーツテンプレート」はテーマを構成するファイルの共通部品ファイルとして引用されます。例えば、header.phpは各ページの共通した「ヘッダー部分」を記述して、DOCTYPE宣言、文字コード、タイトル、リンクなどを、各 [...]]]></description>
			<content:encoded><![CDATA[<p>「パーツテンプレート」はテーマを構成するファイルの共通部品ファイルとして引用されます。例えば、header.phpは各ページの共通した「ヘッダー部分」を記述して、DOCTYPE宣言、文字コード、タイトル、リンクなどを、各ページにインクルードします。</p>
<p>各テンプレートの「ヘッダー部分」は別に「パーツテンプレート」を使わずに、各テンプレートに、個々に記述されれば、それで良いのですが、「パーツテンプレート」を使用することによって、管理がheader.phpに一元化され、また、〈?php wp_head(); ?〉を使用することで、「プラグイン」や「関数ファイル」の制御を受けることができるようになります。また、各ページによって、「ヘッダー部分」の記述が異なる場合はPHP関数（条件文）を使用して、ページごとの記述に変更することも可能です。</p>
<p>「パーツテンプレート」のテンプレートへのインクルードはもともと、WordPress関数によって決められています。例えば、「header.php」は各テンプレートに〈?php get_header(); ?〉、「footer.php」は〈?php get_footer(); ?〉と記述することで、インクルードされます。</p>
<div class="point">
〈?php wp_head(); ?〉はプラグイン・関数ファイルに対してのフックです。この記述は重要で、記述がない場合、プラグイン・関数ファイルが動かない場合があります。特にjavascriptのリンク先追加がおこなわれないので、注意が必要です。
</div>
<p>  ＊「Default_Theme（英語版）」の「header.php」をコメント文（//説明文）を使って機能解説してみましょう。</p>
<h4>Default_Theme／header.php</h4>
<pre class="brush: php; title: ;">

&lt;?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */
?&gt;

//ヘッダー情報の開始・DOCTYPE宣言・言語、文字コード指定
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &lt;?php language_attributes(); ?&gt;&gt;
&lt;head profile=&quot;http://gmpg.org/xfn/11&quot;&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;&lt;?php bloginfo('html_type'); ?&gt;; charset=&lt;?php bloginfo('charset'); ?&gt;&quot; /&gt;

//「サイトタイトルの表示」サイトページ名とサイト名
&lt;title&gt;&lt;?php wp_title('?', true, 'right'); ?&gt; &lt;?php bloginfo('name'); ?&gt;&lt;/title&gt;

//「CSSファイルURLの指定」
&lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;?php bloginfo('stylesheet_url'); ?&gt;&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;

//「フィード・ピングURLの表示」
&lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;&lt;?php bloginfo('name'); ?&gt; RSS Feed&quot; href=&quot;&lt;?php bloginfo('rss2_url'); ?&gt;&quot; /&gt;
&lt;link rel=&quot;alternate&quot; type=&quot;application/atom+xml&quot; title=&quot;&lt;?php bloginfo('name'); ?&gt; Atom Feed&quot; href=&quot;&lt;?php bloginfo('atom_url'); ?&gt;&quot; /&gt;
&lt;link rel=&quot;pingback&quot; href=&quot;&lt;?php bloginfo('pingback_url'); ?&gt;&quot; /&gt;

&lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;

//サイドバー部分の可否によっての表示画像の切り替え
&lt;?php
// Checks to see whether it needs a sidebar or not
if ( !empty($withcomments) &amp;amp;amp;&amp;amp;amp; !is_single() ) {
?&gt;
	#page { background: url(&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/images/kubrickbg-&lt;?php bloginfo('text_direction'); ?&gt;.jpg&quot;) repeat-y top; border: none; }
&lt;?php } else { // No sidebar ?&gt;
	#page { background: url(&quot;&lt;?php bloginfo('stylesheet_directory'); ?&gt;/images/kubrickbgwide.jpg&quot;) repeat-y top; border: none; }
&lt;?php } ?&gt;

&lt;/style&gt;

//記事単体ページの場合のJSファイル引用
&lt;?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?&gt;

//プラグイン・関数ファイルに対してのフック
&lt;?php wp_head(); ?&gt;

&lt;/head&gt;          //ヘッダー情報の終了

&lt;body&gt;
&lt;div id=&quot;page&quot;&gt;

//サイトの共通ヘッダータイトル部分
&lt;div id=&quot;header&quot;&gt;
	&lt;div id=&quot;headerimg&quot;&gt;
		&lt;h1&gt;&lt;a href=&quot;&lt;?php echo get_option('home'); ?&gt;/&quot;&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt;&lt;/h1&gt;
		&lt;div class=&quot;description&quot;&gt;&lt;?php bloginfo('description'); ?&gt;&lt;/div&gt;
	&lt;/div&gt;
&lt;/div&gt;
&lt;hr /&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.exe1993.jp/wpbusiness/archives/default_header_php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.exe1993.jp/wpbusiness/archives/default_header_php/" />
	</item>
		<item>
		<title>Default／archive.php</title>
		<link>http://www.exe1993.jp/wpbusiness/archives/default_archive_php/</link>
		<comments>http://www.exe1993.jp/wpbusiness/archives/default_archive_php/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 18:18:09 +0000</pubDate>
		<dc:creator>ykanazawa</dc:creator>
				<category><![CDATA[themes]]></category>
		<category><![CDATA[wordpress_themes]]></category>

		<guid isPermaLink="false">http://www.exe1993.jp/wpbusiness/?p=1014</guid>
		<description><![CDATA[「アーカイブテンプレート（archive.php）」は「カテゴリー」「日付」「ユーザ」「タグ」などの投稿記事に付けられる属性によって、分類表示しようとする時に利用されるテンプレートファイルです。テンプレートファイルの階層 [...]]]></description>
			<content:encoded><![CDATA[<p>「アーカイブテンプレート（archive.php）」は「カテゴリー」「日付」「ユーザ」「タグ」などの投稿記事に付けられる属性によって、分類表示しようとする時に利用されるテンプレートファイルです。テンプレートファイルの階層としては「記事用テンプレート（single.php）」と同じく、最も汎用性のある階層の「メインテンプレート（index.php）」に次いで、汎用性の高いファイルです。</p>
<p>「アーカイブテンプレート（archive.php）」では投稿記事に付いている属性（「カテゴリー」「日付」「ユーザ」「タグ」など）別の表示を条件式で、全て表現することもできますが、「カテゴリー別」や「日付別」、「ユーザー別」、「タグ別」などの個別テンプレートを作成して、属性別のページを作成することできます。</p>
<p>ブログなどの構造が比較的に単純なものは「アーカイブテンプレート（archive.php）」のみで運用するほうが分かりやすく良いかと思いますが、構造が複雑であろうWebサイトでの利用の際は、個別テンプレートを作成して、構築する方が、分かりやすいテーマになるでしょう。</p>
<p>「アーカイブテンプレート（archive.php）」から派生できる主なテンプレートは次のとおりです。</p>
<div class="point">
<ul>
<li>１．category.php　：カテゴリ用テンプレート／カテゴリー別のコンテンツ一覧表示</li>
<li>２．author.php　：著者用テンプレート／ユーザ別のユーザ・筆者紹介</li>
<li>３．date.php　：日時用テンプレート／年月別のコンテンツ一覧表示</li>
</ul>
</div>
<p>  ＊「Default_Theme（英語版）」の「アーカイブテンプレート（archive.php）」をコメント文（//説明文）を使って機能解説してみましょう。</p>
<h4>Default_Theme／archive.php</h4>
<pre class="brush: php; title: ;">

&lt;?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */
get_header();?&gt;          //インクルードファイル：header.phpを読み込みます

	&lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot;&gt;

		&lt;?php if (have_posts()) : ?&gt;     //属性別の条件式の開始

 	  &lt;?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?&gt;

      //「カテゴリー」アーカイブの際のタイトル・コメント表示（カテゴリー別一覧表示に使用）
 	  &lt;?php /* If this is a category archive */ if (is_category()) { ?&gt;
		&lt;h2 class=&quot;pagetitle&quot;&gt;Archive for the ‘&lt;?php single_cat_title(); ?&gt;’ Category&lt;/h2&gt;

      //「タグ」アーカイブの際のタイトル・コメント表示（タグ別一覧表示に使用）
 	  &lt;?php /* If this is a tag archive */ } elseif( is_tag() ) { ?&gt;
		&lt;h2 class=&quot;pagetitle&quot;&gt;Posts Tagged ‘&lt;?php single_tag_title(); ?&gt;’&lt;/h2&gt;

      //「日別」アーカイブの際のタイトル・コメント表示（xx年xx月xx日別一覧表示に使用）
 	  &lt;?php /* If this is a daily archive */ } elseif (is_day()) { ?&gt;
		&lt;h2 class=&quot;pagetitle&quot;&gt;Archive for &lt;?php the_time('F jS, Y'); ?&gt;&lt;/h2&gt;

      //「月別」アーカイブの際のタイトル・コメント表示（xx年xx月別一覧表示に使用）
 	  &lt;?php /* If this is a monthly archive */ } elseif (is_month()) { ?&gt;
		&lt;h2 class=&quot;pagetitle&quot;&gt;Archive for &lt;?php the_time('F, Y'); ?&gt;&lt;/h2&gt;

      //「年別」アーカイブの際のタイトル・コメント表示（xx年別一覧表示に使用）
 	  &lt;?php /* If this is a yearly archive */ } elseif (is_year()) { ?&gt;
		&lt;h2 class=&quot;pagetitle&quot;&gt;Archive for &lt;?php the_time('Y'); ?&gt;&lt;/h2&gt;

      //「投稿者（著者）別」アーカイブの際のタイトル・コメント表示（投稿者（著者）別一覧表示に使用）
	  &lt;?php /* If this is an author archive */ } elseif (is_author()) { ?&gt;
		&lt;h2 class=&quot;pagetitle&quot;&gt;Author Archive&lt;/h2&gt;

      //属性分類がない場合のタイトル表示
 	  &lt;?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) &lt;amp;&lt;amp; !empty($_GET['paged'])) { ?&gt;
		&lt;h2 class=&quot;pagetitle&quot;&gt;Blog Archives&lt;/h2&gt;
 	  &lt;?php } ?&gt;

      //投稿前後のナビゲーションの表示
		&lt;div class=&quot;navigation&quot;&gt;
			&lt;div class=&quot;alignleft&quot;&gt;&lt;?php next_posts_link('? Older Entries') ?&gt;&lt;/div&gt;
			&lt;div class=&quot;alignright&quot;&gt;&lt;?php previous_posts_link('Newer Entries ?') ?&gt;&lt;/div&gt;
		&lt;/div&gt;

		&lt;?php while (have_posts()) : the_post(); ?&gt; //コンテンツデータを取得する・ループのPHPコードの開始
		&lt;div &lt;?php post_class() ?&gt;&gt;

                //投稿（コンテンツ）タイトル名の表示
				&lt;h3 id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title_attribute(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h3&gt;
				&lt;small&gt;&lt;?php the_time('l, F jS, Y') ?&gt;&lt;/small&gt;

                //投稿（コンテンツ）内容の表示
				&lt;div class=&quot;entry&quot;&gt;
					&lt;?php the_content() ?&gt;
				&lt;/div&gt;

                //投稿タグ・カテゴリー・編集リンク・コメントの表示
				&lt;p class=&quot;postmetadata&quot;&gt;&lt;?php the_tags('Tags: ', ', ', '&lt;br /&gt;'); ?&gt; Posted in &lt;?php the_category(', ') ?&gt; | &lt;?php edit_post_link('Edit', '', ' | '); ?&gt;  &lt;?php comments_popup_link('No Comments ?', '1 Comment ?', '% Comments ?'); ?&gt;&lt;/p&gt;
			&lt;/div&gt;

		&lt;?php endwhile; ?&gt;          //コンテンツデータを取得する・ループのPHPコードの終了

        //投稿前後のナビゲーションの表示
		&lt;div class=&quot;navigation&quot;&gt;
			&lt;div class=&quot;alignleft&quot;&gt;&lt;?php next_posts_link('? Older Entries') ?&gt;&lt;/div&gt;
			&lt;div class=&quot;alignright&quot;&gt;&lt;?php previous_posts_link('Newer Entries ?') ?&gt;&lt;/div&gt;
		&lt;/div&gt;

    //コンテンツデータがないときのメッセージ表示
	&lt;?php else :

		if ( is_category() ) { // If this is a category archive
			printf(&quot;&lt;h2 class='center'&gt;Sorry, but there aren't any posts in the %s category yet.&lt;/h2&gt;&quot;, single_cat_title('',false));
		} else if ( is_date() ) { // If this is a date archive
			echo(&quot;&lt;h2&gt;Sorry, but there aren't any posts with this date.&lt;/h2&gt;&quot;);
		} else if ( is_author() ) { // If this is a category archive
			$userdata = get_userdatabylogin(get_query_var('author_name'));
			printf(&quot;&lt;h2 class='center'&gt;Sorry, but there aren't any posts by %s yet.&lt;/h2&gt;&quot;, $userdata-&gt;display_name);
		} else {
			echo(&quot;&lt;h2 class='center'&gt;No posts found.&lt;/h2&gt;&quot;);
		}
		get_search_form();

	endif;
?&gt;  //属性別の条件式の終了

	&lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;          //インクルードファイル：sideber.phpを読み込みます

&lt;?php get_footer(); ?&gt;          //インクルードファイル：footer.phpを読み込みます
</pre>
<div class="point">
<ul>
<li>１．ヘッダー（header）部分、サイドバー（sidebar）部分、フッター（footer）部分は共通部品として、それぞれのインクルードファイルが読み込まれています。</li>
<li>２．コンテンツデータを取得するループのPHPコードによって、DBからコンテンツデータを取得して、タイトルと内容を表示しています。</li>
<li>３．コンテンツデータに関する投稿日付、投稿者、タグ、カテゴリー等を表示しています。</li>
<li>４．仮にコンテンツデータがないときにはメッセージを表示します。</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.exe1993.jp/wpbusiness/archives/default_archive_php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.exe1993.jp/wpbusiness/archives/default_archive_php/" />
	</item>
		<item>
		<title>Default／page.php</title>
		<link>http://www.exe1993.jp/wpbusiness/archives/default_page_php/</link>
		<comments>http://www.exe1993.jp/wpbusiness/archives/default_page_php/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 18:14:10 +0000</pubDate>
		<dc:creator>ykanazawa</dc:creator>
				<category><![CDATA[themes]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress_themes]]></category>

		<guid isPermaLink="false">http://www.exe1993.jp/wpbusiness/?p=1013</guid>
		<description><![CDATA[「ページ用テンプレート（page.php）」は「時系列」や「カテゴリー」「タグ」などの属性で分類される「投稿」記事とは異なり、「固定ページ」を表示する際に利用されるテンプレートファイルです。 例えば、一般サイトでは「最新 [...]]]></description>
			<content:encoded><![CDATA[<p>「ページ用テンプレート（page.php）」は「時系列」や「カテゴリー」「タグ」などの属性で分類される「投稿」記事とは異なり、「固定ページ」を表示する際に利用されるテンプレートファイルです。</p>
<p>例えば、一般サイトでは「最新NEWS」は「投稿」記事と同じように「時系列」や「カテゴリー」「タグ」別に分類され、活用されますが、「会社情報」や「お問合せ」のようなページには属性に関係なく、「固定ページ」である方が便利です。言い換えれば、「固定ページ」が必要な場合には「ページ用テンプレート（page.php）」が活用されます。</p>
<p>「ページ用テンプレート（page.php）」は「カテゴリー」や「タグ」で分類できないので、「ページ」を使い分ける必要ができた場合は「固有名のページ用テンプレート（example_page.php）」を作成する必要があります。</p>
<p>例えば、「会社情報」などの”一般情報掲載用のテンプレート”と「製品情報」などの”コンテンツ用のテンプレート”を分け、コンテンツ管理をする場合です。その場合、サイトの内容によって、作成画面から、「固有名のページ用テンプレート（example_page.php）：exampleは固有名称」を切り替えて作成することが可能です。</p>
<p>  ＊「Default_Theme（英語版）」の「ページ用テンプレート（page.php）」をコメント文（//説明文）を使って機能解説してみましょう。</p>
<h4>Default_Theme／page.php</h4>
<pre class="brush: php; title: ;">

&lt;?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */

get_header(); ?&gt;          //インクルードファイル：header.phpを読み込みます

	&lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot;&gt;

        //コンテンツデータを取得する・ループのPHPコードの開始
		&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

		&lt;div class=&quot;post&quot; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;

        //コンテンツ・タイトル名の表示
		&lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;

			&lt;div class=&quot;entry&quot;&gt;

                //コンテンツ内容の表示
				&lt;?php the_content('&lt;p class=&quot;serif&quot;&gt;Read the rest of this page &amp;amp;raquo;&lt;/p&gt;'); ?&gt;

                //記事分割の際のリンク表示
				&lt;?php wp_link_pages(array('before' =&gt; '&lt;p&gt;&lt;strong&gt;Pages:&lt;/strong&gt; ', 'after' =&gt; '&lt;/p&gt;', 'next_or_number' =&gt; 'number')); ?&gt;

			&lt;/div&gt;
		&lt;/div&gt;

        //コンテンツデータを取得する・ループのPHPコードの終了
		&lt;?php endwhile; endif; ?&gt;

    //記事編集の際のリンク表示
	&lt;?php edit_post_link('Edit this entry.', '&lt;p&gt;', '&lt;/p&gt;'); ?&gt;

	&lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;          //インクルードファイル：sideber.phpを読み込みます

&lt;?php get_footer(); ?&gt;          //インクルードファイル：footer.phpを読み込みます
</pre>
<div class="point">
<ul>
<li>１．ヘッダー（header）部分、サイドバー（sidebar）部分、フッター（footer）部分は共通部品として、それぞれのインクルードファイルが読み込まれています。</li>
<li>２．コンテンツデータを取得するループのPHPコードによって、DBからコンテンツデータを取得して、タイトルと内容を表示しています。</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.exe1993.jp/wpbusiness/archives/default_page_php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.exe1993.jp/wpbusiness/archives/default_page_php/" />
	</item>
		<item>
		<title>Default／single.php</title>
		<link>http://www.exe1993.jp/wpbusiness/archives/default_single_php/</link>
		<comments>http://www.exe1993.jp/wpbusiness/archives/default_single_php/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 18:13:05 +0000</pubDate>
		<dc:creator>ykanazawa</dc:creator>
				<category><![CDATA[themes]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress_themes]]></category>

		<guid isPermaLink="false">http://www.exe1993.jp/wpbusiness/?p=1012</guid>
		<description><![CDATA[「記事用テンプレート（single.php）」は投稿記事のみの表示となります。テンプレートファイルの階層としては最も汎用性のある階層の「メインテンプレート（index.php）」に次いで、汎用性の高いファイルです。 「イ [...]]]></description>
			<content:encoded><![CDATA[<p>「記事用テンプレート（single.php）」は投稿記事のみの表示となります。テンプレートファイルの階層としては最も汎用性のある階層の「メインテンプレート（index.php）」に次いで、汎用性の高いファイルです。</p>
<p>「イメージテンプレート（image.php）」や「ビデオテンプレート（video.php）」などのテンプレートファイルがテーマ内にない場合、「記事用テンプレート（single.php）」が代行して、その役割を果たします。</p>
<p>基本的には「メインテンプレート（index.php）」の構成に似ていますが、記事に対する「コメント」欄の追加や「トラックバック」の表示などが追加されています。</p>
<p>  ＊「Default_Theme（英語版）」の「単体記事用テンプレート（single.php）」をコメント文（//説明文）を使って機能解説してみましょう。</p>
<h4>Default_Theme／single.php</h4>
<pre class="brush: php; title: ;">
&lt;?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */

get_header();?&gt;          //インクルードファイル：header.phpを読み込みます

	&lt;div id=&quot;content&quot; class=&quot;widecolumn&quot;&gt;

    //コンテンツデータを取得する・ループのPHPコードの開始
	&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

        //投稿前後のナビゲーションの表示
		&lt;div class=&quot;navigation&quot;&gt;
			&lt;div class=&quot;alignleft&quot;&gt;&lt;?php previous_post_link('&amp;amp;laquo; %link') ?&gt;&lt;/div&gt;
			&lt;div class=&quot;alignright&quot;&gt;&lt;?php next_post_link('%link &amp;amp;raquo;') ?&gt;&lt;/div&gt;
		&lt;/div&gt;

		&lt;div &lt;?php post_class() ?&gt; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;

           //投稿（コンテンツ）タイトル名の表示
		    &lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;

			&lt;div class=&quot;entry&quot;&gt;

                //投稿（コンテンツ）内容の表示
				&lt;?php the_content('&lt;p class=&quot;serif&quot;&gt;Read the rest of this entry &amp;amp;raquo;&lt;/p&gt;'); ?&gt;

                //記事分割の際のリンク表示
				&lt;?php wp_link_pages(array('before' =&gt; '&lt;p&gt;&lt;strong&gt;Pages:&lt;/strong&gt; ', 'after' =&gt; '&lt;/p&gt;', 'next_or_number' =&gt; 'number')); ?&gt;

                //投稿（コンテンツ）に付けられた「タグ」の表示
				&lt;?php the_tags( '&lt;p&gt;Tags: ', ', ', '&lt;/p&gt;'); ?&gt;

                //投稿（コンテンツ）の履歴記録（日付、カテゴリー、RSS）メッセージの表示
				&lt;p class=&quot;postmetadata alt&quot;&gt;
					&lt;small&gt;
						This entry was posted
						&lt;?php /* This is commented, because it requires a little adjusting sometimes.
							You'll need to download this plugin, and follow the instructions:
							http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
							/* $entry_datetime = abs(strtotime($post-&gt;post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?&gt;
						on &lt;?php the_time('l, F jS, Y') ?&gt; at &lt;?php the_time() ?&gt;
						and is filed under &lt;?php the_category(', ') ?&gt;.
						You can follow any responses to this entry through the &lt;?php post_comments_feed_link('RSS 2.0'); ?&gt; feed.

                //コメント、トラックバック／ピンバックに関するメッセージの表示
						&lt;?php if (('open' == $post-&gt; comment_status) &amp;amp;&amp;amp; ('open' == $post-&gt;ping_status)) {
							// Both Comments and Pings are open ?&gt;
							You can &lt;a href=&quot;#respond&quot;&gt;leave a response&lt;/a&gt;, or &lt;a href=&quot;&lt;?php trackback_url(); ?&gt;&quot; rel=&quot;trackback&quot;&gt;trackback&lt;/a&gt; from your own site.

						&lt;?php } elseif (!('open' == $post-&gt; comment_status) &amp;amp;&amp;amp; ('open' == $post-&gt;ping_status)) {
							// Only Pings are Open ?&gt;
							Responses are currently closed, but you can &lt;a href=&quot;&lt;?php trackback_url(); ?&gt; &quot; rel=&quot;trackback&quot;&gt;trackback&lt;/a&gt; from your own site.

						&lt;?php } elseif (('open' == $post-&gt; comment_status) &amp;amp;&amp;amp; !('open' == $post-&gt;ping_status)) {
							// Comments are open, Pings are not ?&gt;
							You can skip to the end and leave a response. Pinging is currently not allowed.

						&lt;?php } elseif (!('open' == $post-&gt; comment_status) &amp;amp;&amp;amp; !('open' == $post-&gt;ping_status)) {
							// Neither Comments, nor Pings are open ?&gt;
							Both comments and pings are currently closed.

						&lt;?php } edit_post_link('Edit this entry','','.'); ?&gt;

					&lt;/small&gt;
				&lt;/p&gt;

			&lt;/div&gt;
		&lt;/div&gt;

	&lt;?php comments_template(); ?&gt;          //インクルードファイル：comment.phpを読み込みます

	&lt;?php endwhile; else: ?&gt;          //コンテンツデータがないときのメッセージ表示

		&lt;p&gt;Sorry, no posts matched your criteria.&lt;/p&gt;

&lt;?php endif; ?&gt;          //コンテンツデータを取得する・ループのPHPコードの終了

	&lt;/div&gt;

&lt;?php get_footer(); ?&gt;          //インクルードファイル：footer.phpを読み込みます
</pre>
<div class="point">
<ul>
<li>１．ヘッダー（header）部分、サイドバー（sidebar）部分、フッター（footer）部分は共通部品として、それぞれのインクルードファイルが読み込まれています。</li>
<li>２．コンテンツデータを取得するループのPHPコードによって、DBからコンテンツデータを取得して、タイトルと内容を表示しています。</li>
<li>３．投稿（コンテンツ）の履歴記録（日付、カテゴリー、RSS）メッセージを表示しています。</li>
<li>４．コンテンツデータに関する投稿日付、投稿者、タグ、カテゴリー等を表示しています。</li>
<li>５．コメント、トラックバック／ピンバックに関するメッセージを表示しています。</li>
<li>６．仮にコンテンツデータがないときには「Sorry, no posts matched your criteria.」を表示します。</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.exe1993.jp/wpbusiness/archives/default_single_php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.exe1993.jp/wpbusiness/archives/default_single_php/" />
	</item>
	</channel>
</rss>

