<?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>FAQ &#187; カスタムフィールド</title>
	<atom:link href="http://tenman.info/labo/manual/tag/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%83%95%e3%82%a3%e3%83%bc%e3%83%ab%e3%83%89/feed/" rel="self" type="application/rss+xml" />
	<link>http://tenman.info/labo/manual</link>
	<description>Just another 仙台入門new weblog</description>
	<lastBuildDate>Fri, 20 Aug 2010 09:14:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>カスタムフィールド</title>
		<link>http://tenman.info/labo/manual/2009/05/27/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%83%95%e3%82%a3%e3%83%bc%e3%83%ab%e3%83%89/</link>
		<comments>http://tenman.info/labo/manual/2009/05/27/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%83%95%e3%82%a3%e3%83%bc%e3%83%ab%e3%83%89/#comments</comments>
		<pubDate>Tue, 26 May 2009 23:47:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[用語]]></category>
		<category><![CDATA[管理者]]></category>
		<category><![CDATA[カスタムフィールド]]></category>
		<category><![CDATA[全般]]></category>

		<guid isPermaLink="false">http://tenman.info/labo/manual/?p=641</guid>
		<description><![CDATA[カスタムフィールドの使い方 カスタムフィールドを使って、テンプレートファイルをカスタマイズすると、通常投稿タイトルや、本文が表示される場所以外に、自分の思い通りの場所に、特別に、投稿エリアを設定する事ができます。 カスタ [...]]]></description>
			<content:encoded><![CDATA[

<p><a href="http://wpdocs.sourceforge.jp/%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E3%83%95%E3%82%A3%E3%83%BC%E3%83%AB%E3%83%89%E3%81%AE%E4%BD%BF%E3%81%84%E6%96%B9" onclick="this.target='_self';" onkeypress="this.target='_self';">カスタムフィールドの使い方</a></p>

<p>カスタムフィールドを使って、テンプレートファイルをカスタマイズすると、通常投稿タイトルや、本文が表示される場所以外に、自分の思い通りの場所に、特別に、投稿エリアを設定する事ができます。</p>

<p>カスタムフィールドは、管理画面の投稿フォームに、いつでも新規投稿と、編集が可能なように用意されています。</p>

<pre id="presouce-post-6411">

<code title="line1">&lt;?php the_meta(); ?&gt;</code>
</pre>

<p>というコードを、テンプレートファイルに貼り付けることで表示できるようになります。<br />
貼り付ける場所によって、カスタムフィールドが表示されない事がありますから、<br />
よくわからないときには、テンプレートファイルの、the_post();の部分を探して、</p>

<pre id="presouce-post-6412">

<code title="line1">the_post(); the_meta();</code>
</pre>

<p>に書き換えて表示してみましょう。</p>

]]></content:encoded>
			<wfw:commentRss>http://tenman.info/labo/manual/2009/05/27/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%83%95%e3%82%a3%e3%83%bc%e3%83%ab%e3%83%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>カスタムフィールドの「値だけ表示する」</title>
		<link>http://tenman.info/labo/manual/2009/05/27/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%83%95%e3%82%a3%e3%83%bc%e3%83%ab%e3%83%89%e3%81%ae%e3%80%8c%e5%80%a4%e3%81%a0%e3%81%91%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b%e3%80%8d/</link>
		<comments>http://tenman.info/labo/manual/2009/05/27/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%83%95%e3%82%a3%e3%83%bc%e3%83%ab%e3%83%89%e3%81%ae%e3%80%8c%e5%80%a4%e3%81%a0%e3%81%91%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b%e3%80%8d/#comments</comments>
		<pubDate>Tue, 26 May 2009 23:43:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[styling]]></category>
		<category><![CDATA[管理者]]></category>
		<category><![CDATA[template]]></category>
		<category><![CDATA[カスタムフィールド]]></category>

		<guid isPermaLink="false">http://tenman.info/labo/manual/?p=638</guid>
		<description><![CDATA[post_custom() the_meta()によって、すべてのカスタムフィールドのキーと値が表示されているときには、 &#60;?php echo post_custom('key'); ?&#62;を使う方法があります [...]]]></description>
			<content:encoded><![CDATA[

<h2 id="h2-post-6381">post_custom() </h2>

<p>the_meta()によって、すべてのカスタムフィールドのキーと値が表示されているときには、</p>

<pre id="presouce-post-6381">

<code title="line1">&lt;?php echo post_custom('key'); ?&gt;を使う方法があります。</code>
</pre>

<p>また、複数（の可能性がある）カスタムフィールドを表示する場合は、以下のようにしてもよいかもしれない。</p>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span>have_posts<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> the_post<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$mywords</span> <span style="color: #339933;">=</span> post_custom<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'key'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$mywords</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #990000;">implode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$separator</span><span style="color: #339933;">,</span> <span style="color: #000088;">$mywords</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$mywords</span> <span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">endwhile</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">endif</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>


]]></content:encoded>
			<wfw:commentRss>http://tenman.info/labo/manual/2009/05/27/%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%83%95%e3%82%a3%e3%83%bc%e3%83%ab%e3%83%89%e3%81%ae%e3%80%8c%e5%80%a4%e3%81%a0%e3%81%91%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b%e3%80%8d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

