<?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>the_content &#8211; WordPressカスタマイズ、サイト作成メモ</title>
	<atom:link href="https://msn100.org/tag/the_content/feed" rel="self" type="application/rss+xml" />
	<link>https://msn100.org</link>
	<description>WordPressサイト制作を手がけるToshiyuki TanakaのFAQ、ヒント、Tipsなどの覚え書きです</description>
	<lastBuildDate>Mon, 20 Oct 2025 03:44:55 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/>
<atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/>
<atom:link rel="hub" href="https://websubhub.com/hub"/>
<atom:link rel="self" href="https://msn100.org/tag/the_content/feed"/>
	<item>
		<title>プラグインも不要！ 「続きを読む」の簡単カスタマイズ法</title>
		<link>https://msn100.org/template_tag/more_customize.html</link>
		
		<dc:creator><![CDATA[Kota]]></dc:creator>
		<pubDate>Wed, 06 Feb 2013 07:15:26 +0000</pubDate>
				<category><![CDATA[WPテンプレートタグ]]></category>
		<category><![CDATA[続きを読む]]></category>
		<category><![CDATA[the_content]]></category>
		<category><![CDATA[投稿]]></category>
		<guid isPermaLink="false">http://msn100.org/?p=150</guid>

					<description><![CDATA[moreタグで投稿を途中まで表示させるのはブログの常套手段、一般サイトでもニュースリリースなどでよく使いますが、デフォルトでは（テーマによりますが）「→続きを読む」など、素っ気なかったりして変更したいことが多いと思います [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>moreタグで投稿を途中まで表示させるのはブログの常套手段、一般サイトでもニュースリリースなどでよく使いますが、デフォルトでは（テーマによりますが）「→続きを読む」など、素っ気なかったりして変更したいことが多いと思います。この変更方法があまりに簡単でのけぞってしまいました(笑)<br />
<span id="more-150"></span></p>
<p>やり方は、投稿本文を表示するためのテンプレートタグ、<strong>the_content()</strong> のカッコ内に記入するだけでした。たとえば「記事の全文を読む」にしたい場合は、テーマ内で使われているthe_contentを</p>
<pre class="brush: php; light: true; title: ; notranslate">&lt;?php the_content('記事の全文を読む'); ?&gt;</pre>
<p>とするだけ。日本語も直接書けるのは楽でいいですね。文字実体参照もOKです。</p>
<p>しかも<strong>HTMLタグも使えます。</strong>任意のタグやClassも付けられますね。</p>
<pre class="brush: php; light: true; title: ; notranslate">&lt;?php the_content('&lt;span class=&quot;more-read&quot;&gt;続きはこちら！&lt;/span&gt;'); ?&gt;</pre>
<p>HTMLタグが使えるので、<strong>画像も使えます</strong>。あらかじめ画像を用意しておいて、imgタグを入れればOK。</p>
<pre class="brush: php; light: true; title: ; notranslate">&lt;?php the_content('&lt;img src=&quot;img/more.gif&quot; alt=&quot;Read More&quot;&gt;'); ?&gt;</pre>
<p>のようにすれば、文字の代わりにmore.gifが表示されます。</p>
<p>さらにさらに、<strong>記事タイトルを入れる</strong>こともできます。</p>
<p>たとえば「WPカスタマイズの極意」という記事タイトルで、「≪ WPカスタマイズの極意 ≫の続きを読む」のように、各記事ごとにその記事のタイトルを入れて表示させたい場合は、</p>
<pre class="brush: php; light: true; title: ; notranslate">&lt;?php the_content(&quot;≪ &quot; . get_the_title('', '', false) . &quot; ≫の続きを読む&quot;); ?&gt;</pre>
<p>とします。プラグインなどを探したり、funciton.phpに記述を加える必要もないのはありがたいですね。ただ配布されているテーマの場合、アップデートしちゃうと消えちゃうのが難点ですが。</p>
<p>参考：<a href="http://wpdocs.sourceforge.jp/%E3%80%8C%E7%B6%9A%E3%81%8D%E3%82%92%E8%AA%AD%E3%82%80%E3%80%8D%E3%81%AE%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%9E%E3%82%A4%E3%82%BA">「続きを読む」のカスタマイズ &#8211; WordPress Codex 日本語版</a></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
