<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	
	>
<channel>
	<title>
	【WordPress】カスタム投稿タイプ、リッチスニペットに対応したパンくずリストを表示する へのコメント	</title>
	<atom:link href="https://increment-log.com/wordpress-breadcrumb/feed/" rel="self" type="application/rss+xml" />
	<link>https://increment-log.com/wordpress-breadcrumb/</link>
	<description>色々勉強中の人間が色々書いてるブログです</description>
	<lastBuildDate>Fri, 18 Oct 2019 01:45:25 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.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"/>	<item>
		<title>
		ShioTsugi より		</title>
		<link>https://increment-log.com/wordpress-breadcrumb/#comment-1937</link>

		<dc:creator><![CDATA[ShioTsugi]]></dc:creator>
		<pubDate>Sun, 02 Aug 2015 17:26:00 +0000</pubDate>
		<guid isPermaLink="false">https://increment-log.com/?p=1936#comment-1937</guid>

					<description><![CDATA[&lt;a href=&quot;https://increment-log.com/wordpress-breadcrumb/#comment-1936&quot;&gt;ぬるぽん＠２合&lt;/a&gt; への返信。

ぬるぽん＠２合さん

こちらこそ初めまして！また、コード修正のコメントありがとうございますm(__)m
早速コード内容に反映させていただきました。

ちなみに自分は今、当記事のコードより簡易的なバージョンの自作パンくずリストを使用しています。（ただコチラはカスタム投稿タイプ&#038;日付アーカイブは対応していないので状況に応じて使い分けてます）
もし宜しければご一読下さい。こちらもどこか間違っている可能性は否めませんけど…^^;
https://increment-log.com/wordpress-breadcrumb-function/]]></description>
			<content:encoded><![CDATA[<p><a href="https://increment-log.com/wordpress-breadcrumb/#comment-1936">ぬるぽん＠２合</a> への返信。</p>
<p>ぬるぽん＠２合さん</p>
<p>こちらこそ初めまして！また、コード修正のコメントありがとうございますm(__)m<br />
早速コード内容に反映させていただきました。</p>
<p>ちなみに自分は今、当記事のコードより簡易的なバージョンの自作パンくずリストを使用しています。（ただコチラはカスタム投稿タイプ&amp;日付アーカイブは対応していないので状況に応じて使い分けてます）<br />
もし宜しければご一読下さい。こちらもどこか間違っている可能性は否めませんけど…^^;<br />
<a href="https://increment-log.com/wordpress-breadcrumb-function/" rel="ugc">https://increment-log.com/wordpress-breadcrumb-function/</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		ぬるぽん＠２合 より		</title>
		<link>https://increment-log.com/wordpress-breadcrumb/#comment-1936</link>

		<dc:creator><![CDATA[ぬるぽん＠２合]]></dc:creator>
		<pubDate>Wed, 29 Jul 2015 09:49:00 +0000</pubDate>
		<guid isPermaLink="false">https://increment-log.com/?p=1936#comment-1936</guid>

					<description><![CDATA[初めまして。

カスタム投稿タイプのパンくずリストを求めてこちらにたどり着きました。
ありがたく使用させていただいています。

本題ですが、タームが未選択状態になっている場合にエラーとなるので、一部修正していただければと思います。

エラー箇所：97行目から
// タームが未選択だとfalseが返ってきます
$taxes = get_the_terms($post-&#062;ID, $mytax);

// ここの部分を以下に修正
            $tax = $taxes ? get_youngest_tax($taxes, $mytax ) : null;

// 条件分岐を追加
if( !empty($tax) ) {
  if($tax -&#062; parent != 0){
    $ancestors = array_reverse(get_ancestors( $tax -&#062; term_id, $mytax ));
    foreach($ancestors as $ancestor){
      $str.=&#039;&lt;a&gt;&lt;span&gt;&#039;. get_term($ancestor, $mytax)-&#062;name . &#039;&lt;/span&gt;&lt;/a&gt;&#039;;
      $str.= $separatorHTML;
    }
  }
  $str.=&#039;&lt;a&gt;&lt;span&gt;&#039;. $tax -&#062; name . &#039;&lt;/span&gt;&lt;/a&gt;&#039;;
  $str.= $separatorHTML;
} // !empty($tax)

＝＝＝＝＝＝＝＝＝＝＝＝＝＝
今のところこれでエラーを回避してます。]]></description>
			<content:encoded><![CDATA[<p>初めまして。</p>
<p>カスタム投稿タイプのパンくずリストを求めてこちらにたどり着きました。<br />
ありがたく使用させていただいています。</p>
<p>本題ですが、タームが未選択状態になっている場合にエラーとなるので、一部修正していただければと思います。</p>
<p>エラー箇所：97行目から<br />
// タームが未選択だとfalseが返ってきます<br />
$taxes = get_the_terms($post-&gt;ID, $mytax);</p>
<p>// ここの部分を以下に修正<br />
            $tax = $taxes ? get_youngest_tax($taxes, $mytax ) : null;</p>
<p>// 条件分岐を追加<br />
if( !empty($tax) ) {<br />
  if($tax -&gt; parent != 0){<br />
    $ancestors = array_reverse(get_ancestors( $tax -&gt; term_id, $mytax ));<br />
    foreach($ancestors as $ancestor){<br />
      $str.=&#8217;<a><span>&#8216;. get_term($ancestor, $mytax)-&gt;name . &#8216;</span></a>&#8216;;<br />
      $str.= $separatorHTML;<br />
    }<br />
  }<br />
  $str.=&#8217;<a><span>&#8216;. $tax -&gt; name . &#8216;</span></a>&#8216;;<br />
  $str.= $separatorHTML;<br />
} // !empty($tax)</p>
<p>＝＝＝＝＝＝＝＝＝＝＝＝＝＝<br />
今のところこれでエラーを回避してます。</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
