<?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/"
	>

<channel>
	<title>Web制作 ウェブマジック &#187; WPタグ</title>
	<atom:link href="http://www.hp-webmagic.com/wordpress/archives/tag/wp-tag/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hp-webmagic.com/wordpress</link>
	<description>高品質なのに低価格 Web標準hp制作・CMS・ネットショップ</description>
	<lastBuildDate>Fri, 10 Feb 2012 03:27:49 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress：インクルードタグ</title>
		<link>http://www.hp-webmagic.com/wordpress/archives/256</link>
		<comments>http://www.hp-webmagic.com/wordpress/archives/256#comments</comments>
		<pubDate>Wed, 29 Oct 2008 00:40:14 +0000</pubDate>
		<dc:creator>Web Magic</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WPタグ]]></category>
		<category><![CDATA[カスタマイズ]]></category>

		<guid isPermaLink="false">http://www.hp-webmagic.com/?p=256</guid>
		<description><![CDATA[特定のファイル（phpファイル）の読み込み。 ファイル名を指定 &#60;?php get_header();&#160;?&#62; &#60;?php get_footer();&#160;?&#62; &#60;?php g [...]]]></description>
			<content:encoded><![CDATA[<p>特定のファイル（phpファイル）の読み込み。</p>
<p>フ<strong>ァイル名を指定</strong></p>
<pre>&lt;?php get_header();&nbsp;?&gt;
&lt;?php get_footer();&nbsp;?&gt;
&lt;?php get_sidebar();&nbsp;?&gt;
&lt;?php comments_template();&nbsp;?&gt;</pre>
<p><strong>TEMPLATEPATH/sidebar-2.phpを作製したとき</strong></p>
<pre>&lt;?php get_sidebar('2');&nbsp;?&gt;
sidebar-***.php の ***部分 2.5以上</pre>
<h3>特定のテンプレートの読み込み。</h3>
<p>T<strong>EMPLATEPATH/header-singleを作製したとき</strong></p>
<pre>&lt;?php include (TEMPLATEPATH . '/header-single.php'); ?&gt;</pre>
<p>デザイン的に変更箇所が多い場合はこちらが便利。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hp-webmagic.com/wordpress/archives/256/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress：条件分岐指定タグ</title>
		<link>http://www.hp-webmagic.com/wordpress/archives/255</link>
		<comments>http://www.hp-webmagic.com/wordpress/archives/255#comments</comments>
		<pubDate>Tue, 28 Oct 2008 06:17:44 +0000</pubDate>
		<dc:creator>Web Magic</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[WPタグ]]></category>
		<category><![CDATA[カスタマイズ]]></category>

		<guid isPermaLink="false">http://www.hp-webmagic.com/?p=255</guid>
		<description><![CDATA[特定のページにだけ特定内容を表示させたい時などに使用。 index.phpにだけ特定内容を表示 page.phpにだけ特定内容を表示 single.phpにだけ特定内容を表示など &#60;?php if(タグ): ?&#038;g [...]]]></description>
			<content:encoded><![CDATA[<p>特定のページにだけ特定内容を表示させたい時などに使用。</p>
<ul>
<li>index.phpにだけ特定内容を表示</li>
<li>page.phpにだけ特定内容を表示</li>
<li>single.phpにだけ特定内容を表示など</li>
</ul>
<pre>&lt;?php if(タグ): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p>指定サンプル:1</p>
<pre>&lt;?php if(is_home()): ?&gt;
&lt;h1&gt;AAAAAAAAAA&lt;/h1&gt;
&lt;?php endif; ?&gt;
&lt;?php if(is_archive()): ?&gt;
&lt;h1&gt;BBBBBBBBBB&lt;/h1&gt;
&lt;?php endif; ?&gt;</pre>
<p>指定サンプル:2</p>
<pre>&lt;?php if(is_home()): ?&gt;
&lt;h1&gt;AAAAAAAAAA&lt;/h1&gt;
&lt;?php else: ?&gt;
&lt;h1&gt;BBBBBBBBBB&lt;/h1&gt;
&lt;?php endif; ?&gt;</pre>
<p><strong>メインページ</strong></p>
<pre>&lt;?php if(is_home()): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p><strong>フロントページ</strong></p>
<p>サイトのフロントページが表示されている場合。投稿の場合とページの場合あり。管理画面の「設定&gt;表示設定&gt;トップページの表示」で、「最新の投稿」が選択されているか、「固定ページ (以下を選択)」で現在のページが表示されている場合。 注: この条件タグは バージョン 2.5 で追加。 </p>
<pre>&lt;?php if(is_front_page()): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p><strong>シングルページ</strong></p>
<pre>&lt;?php if(is_single()): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p><strong>記事を含むページ</strong></p>
<pre>&lt;?php if(comments_open()): ?&gt; ～ &lt;?php endif; ?&gt;
WordPress ループ内で処理中の記事がコメント受信を受け付けている場合</pre>
<pre>&lt;?php if(pings_open()): ?&gt; ～ &lt;?php endif; ?&gt;
WordPress ループ内で処理中の記事がピン(ピンバックおよびトラックバック)を受け付けている場合</pre>
<p><strong>ページ</strong></p>
<pre>&lt;?php if(is_page()): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p><strong>ページテンプレート（バージョン 2.5以降）</strong></p>
<pre>&lt;?php if(is_page_template()): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p><strong>カテゴリーページ</strong></p>
<pre>&lt;?php if(is_category()): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p><strong>アーカイブページ</strong></p>
<pre>&lt;?php if(is_archive()): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p><strong>タグページ</strong></p>
<pre>&lt;?php if(is_tag()): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p><strong>日付別ページ</strong></p>
<pre>&lt;?php if(is_date()): ?&gt; ～ &lt;?php endif; ?&gt;
&lt;?php if(is_year()): ?&gt; ～ &lt;?php endif; ?&gt;
&lt;?php if(is_month()): ?&gt; ～ &lt;?php endif; ?&gt;
&lt;?php if(is_day()): ?&gt; ～ &lt;?php endif; ?&gt;
&lt;?php if(is_time()): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p><strong>検索結果ページ</strong></p>
<pre>&lt;?php if(is_search()): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p><strong>404 Not Found ページ</strong></p>
<pre>&lt;?php if(is_404()): ?&gt; ～ &lt;?php endif; ?&gt;</pre>
<p><span id="more-255"></span></p>
<h3>詳細条件分岐指定</h3>
<p><strong>シングルページ</strong></p>
<pre>&lt;?php if(is_single('17')): ?&gt; ～ &lt;?php endif; ?&gt;
ID 17の記事が表示されている場合</pre>
<pre>&lt;?php if(is_single('Irish Stew')): ?&gt; ～ &lt;?php endif; ?&gt;
&quot;Irish Stew&quot;(ビーフシチュー)というタイトルの記事が表示されている場合</pre>
<pre>&lt;?php if(is_single('beef-stew')): ?&gt; ～ &lt;?php endif; ?&gt;
&quot;beef-stew&quot;(ビーフシチュー)という投稿スラッグの記事が表示されている場合</pre>
<pre>&lt;?php if(is_single(array(17,'beef-stew','Irish Stew'))): ?&gt; ～ &lt;?php endif; ?&gt;
ID が 17、投稿スラッグが "beef-stew"、またはタイトルが "Irish Stew" のいずれかにあてはまる記事が表示されている場合。注: 配列を引数に使えるのは バージョン 2.5 以降</pre>
<p><strong>ページ</strong></p>
<pre>&lt;?php if(is_page('42')): ?&gt; ～ &lt;?php endif; ?&gt;
ID 42のページが表示されている場合</pre>
<pre>&lt;?php if(is_page('About Me And Joe')): ?&gt; ～ &lt;?php endif; ?&gt;
&quot;About Me And Joe&quot;というタイトルのページが表示されている場合</pre>
<pre>&lt;?php if(is_page('about-me')): ?&gt; ～ &lt;?php endif; ?&gt;
&quot;about-me&quot;という投稿スラッグのページが表示されている場合</pre>
<pre>&lt;?php if(is_page(array(42,'about-me','About Me And Joe'))): ?&gt; ～ &lt;?php endif; ?&gt;
ID が 42、投稿スラッグが&quot;about-me&quot;またはタイトルが&quot;About Me And Joe&quot;のいずれかにあてはまるページが表示されている場合
注: 配列を引数に使えるのは バージョン 2.5 以降</pre>
<p><strong>ページテンプレート（バージョン 2.5以降）</strong></p>
<pre>&lt;?php if(is_page_template('about')): ?&gt; ～ &lt;?php endif; ?&gt;
&quot;about&quot;というページテンプレートが使われている場合</pre>
<p><strong>カテゴリーページ</strong></p>
<pre>&lt;?php if(is_category('9')): ?&gt; ～ &lt;?php endif; ?&gt;
カテゴリーID 9のアーカイブページが表示されている場合</pre>
<pre>&lt;?php if(is_category('Stinky Cheeses')): ?&gt; ～ &lt;?php endif; ?&gt;
&quot;Stinky Cheeses&quot;というカテゴリーのアーカイブページが表示されている場合</pre>
<pre>&lt;?php if(is_category('blue-cheese')): ?&gt; ～ &lt;?php endif; ?&gt;
&quot;blue-cheese&quot;というカテゴリースラッグのアーカイブページが表示されている場合</pre>
<pre>&lt;?php if(<span>in</span>_category('5')): ?&gt; ～ &lt;?php endif; ?&gt;
現在の記事がカテゴリーID 5に属する場合にtrueを返す</pre>
<p><strong>タグページ</strong></p>
<pre>&lt;?php if(is_tag('mild')): ?&gt; ～ &lt;?php endif; ?&gt;
&quot;mild&quot;というスラッグのついたタグのアーカイブページが表示されている場合</pre>
<pre>&lt;?php if(is_tag(array('sharp','mild','extreme'))): ?&gt; ～ &lt;?php endif; ?&gt;
&quot;sharp&quot;または&quot;mild&quot;または&quot;extreme&quot;というスラッグのついたタグのアーカイブページが表示されている場合
注: 配列を引数に使えるのは バージョン 2.5 以降</pre>
<p>参考：<a href="http://wpdocs.sourceforge.jp/Conditional_Tags">Conditional Tags</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hp-webmagic.com/wordpress/archives/255/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

