<?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>WordPressな日々 &#187; Moreタグ</title>
	<atom:link href="http://www.junyx.net/tag/more%e3%82%bf%e3%82%b0/feed" rel="self" type="application/rss+xml" />
	<link>http://www.junyx.net</link>
	<description>WordPress、PHP、Linux、インターネット技術の解説、IT関連ニュースなど</description>
	<lastBuildDate>Thu, 08 Sep 2011 04:31:36 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>TIPS &#8211; トップページに要約だけを表示</title>
		<link>http://www.junyx.net/wordpress/2007/184</link>
		<comments>http://www.junyx.net/wordpress/2007/184#comments</comments>
		<pubDate>Wed, 06 Jun 2007 02:07:26 +0000</pubDate>
		<dc:creator>journey</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Moreタグ]]></category>
		<category><![CDATA[トップページ]]></category>
		<category><![CDATA[抜粋表示]]></category>
		<category><![CDATA[要約]]></category>

		<guid isPermaLink="false">http://www.junyx.net/wordpress/2007/184</guid>
		<description><![CDATA[WordPressを使いこなすヒントです。今回はトップページにタイトルと要約だけを表示する方法を紹介します。 WordPressのテーマをダウンロードしてインストールすると、普通のブログ・デザイン同様に記事の全文が10件 [...]]]></description>
			<content:encoded><![CDATA[<p>WordPressを使いこなすヒントです。今回はトップページにタイトルと要約だけを表示する方法を紹介します。</p>
<p>WordPressのテーマをダウンロードしてインストールすると、普通のブログ・デザイン同様に記事の全文が10件表示されます。記事が短ければ良いのですが長い記事が続く場合、表示が終わるまでに時間がかかり、使い勝手も悪くなります。そこで、記事全文の代わりに要約だけを表示させてみましょう。</p>
<p>記事を投稿する際は、要約として表示させる部分の直後に More タグを挿入します。ビジュアルリッチエディタを使っている場合、エディタ画面上部に並んでいるアイコンの右から3番目をクリックしてください。はい、これだけでトップ画面がスッキリしたはずです。以前に投稿した記事にも同様にMoreタグを挿入しましょう。</p>
<p><span id="more-184"></span>さて、次は、記事投稿画面の「抜粋表示オプション」または「記事本文のMoreタグより上の部分」を表示させる方法です。こちらはテンプレートファイルを編集することになるので、ちと高度です。</p>
<p>テーマのフォルダ名を仮に THEME とすると、トップページのテンプレートは次の場所にあります。</p>
<ul>
<li><strong>wp-content/themes/THEME/index.php</strong></li>
</ul>
<p>このファイルをエディタで開き、次のように編集します。the_content() 関数の代わりに the_excerpt() 関数を使うわけです。後者には「続きを読む」リンクを表示させる機能がないので、the_permalink() 関数を使って情報を補います。</p>
<ul>
<li>変更前</li>
</ul>
<blockquote><p>&lt;?php the_content(&#8216;Read more »&#8217;); ?&gt;</p></blockquote>
<ul>
<li>変更後</li>
</ul>
<blockquote><p>&lt;?php the_excerpt(); ?&gt;<br />
&lt;a href=&#8221;&lt;?php the_permalink() ?&gt;&#8221; rel=&#8221;bookmark&#8221; title=&#8221;Permanent Link to &lt;?php the_title(); ?&gt;&#8221;&gt;続きを読む »&lt;/a&gt;</p></blockquote>
<p>カテゴリー別や月別のアーカイブも同じような表示にしたいときは、 <strong>wp-content/themes/THEME/archive.php</strong> も同様に編集してください。</p>
<p>次回は静的なページの目次を表示する方法について解説する予定です。</p>
<p>ご質問・ご意見はコメント欄にどうぞ♪</p>
]]></content:encoded>
			<wfw:commentRss>http://www.junyx.net/wordpress/2007/184/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

