<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									インデックスリストミドル広告を4記事おきに表示させるようにしたい - Cocoonテーマに関する質問				            </title>
            <link>https://wp-cocoon.com/community/cocoon-theme/%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%aa%e3%82%b9%e3%83%88%e3%83%9f%e3%83%89%e3%83%ab%e5%ba%83%e5%91%8a%e3%82%924%e8%a8%98%e4%ba%8b%e3%81%8a%e3%81%8d%e3%81%ab%e8%a1%a8%e7%a4%ba/</link>
            <description>Cocoon ディスカッション掲示板</description>
            <language>ja</language>
            <lastBuildDate>Wed, 15 Apr 2026 09:58:15 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: インデックスリストミドル広告を4記事おきに表示させるようにしたい</title>
                        <link>https://wp-cocoon.com/community/cocoon-theme/%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%aa%e3%82%b9%e3%83%88%e3%83%9f%e3%83%89%e3%83%ab%e5%ba%83%e5%91%8a%e3%82%924%e8%a8%98%e4%ba%8b%e3%81%8a%e3%81%8d%e3%81%ab%e8%a1%a8%e7%a4%ba/#post-81882</link>
                        <pubDate>Thu, 31 Oct 2024 08:22:12 +0000</pubDate>
                        <description><![CDATA[ありがとうございます。
勉強します。]]></description>
                        <content:encoded><![CDATA[<p>ありがとうございます。</p>
<p>勉強します。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/cocoon-theme/">Cocoonテーマに関する質問</category>                        <dc:creator>sonicau4</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/cocoon-theme/%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%aa%e3%82%b9%e3%83%88%e3%83%9f%e3%83%89%e3%83%ab%e5%ba%83%e5%91%8a%e3%82%924%e8%a8%98%e4%ba%8b%e3%81%8a%e3%81%8d%e3%81%ab%e8%a1%a8%e7%a4%ba/#post-81882</guid>
                    </item>
				                    <item>
                        <title>RE: インデックスリストミドル広告を4記事おきに表示させるようにしたい</title>
                        <link>https://wp-cocoon.com/community/cocoon-theme/%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%aa%e3%82%b9%e3%83%88%e3%83%9f%e3%83%89%e3%83%ab%e5%ba%83%e5%91%8a%e3%82%924%e8%a8%98%e4%ba%8b%e3%81%8a%e3%81%8d%e3%81%ab%e8%a1%a8%e7%a4%ba/#post-81881</link>
                        <pubDate>Thu, 31 Oct 2024 06:33:24 +0000</pubDate>
                        <description><![CDATA[カスタマイズするにあたり、勉強を兼ね、Cocoonのソースを覗いてみましょう。過去の質問、要望を反映できるよう、改善されている場合があります。また、Cocoonは、数多くのフックを備えており、工夫すれば簡単にカスタマイズできます。]]></description>
                        <content:encoded><![CDATA[<p>カスタマイズするにあたり、勉強を兼ね、Cocoonのソースを覗いてみましょう。<br />過去の質問、要望を反映できるよう、改善されている場合があります。<br />また、Cocoonは、数多くのフックを備えており、工夫すれば簡単にカスタマイズできます。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/cocoon-theme/">Cocoonテーマに関する質問</category>                        <dc:creator>大門未知子</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/cocoon-theme/%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%aa%e3%82%b9%e3%83%88%e3%83%9f%e3%83%89%e3%83%ab%e5%ba%83%e5%91%8a%e3%82%924%e8%a8%98%e4%ba%8b%e3%81%8a%e3%81%8d%e3%81%ab%e8%a1%a8%e7%a4%ba/#post-81881</guid>
                    </item>
				                    <item>
                        <title>RE: インデックスリストミドル広告を4記事おきに表示させるようにしたい</title>
                        <link>https://wp-cocoon.com/community/cocoon-theme/%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%aa%e3%82%b9%e3%83%88%e3%83%9f%e3%83%89%e3%83%ab%e5%ba%83%e5%91%8a%e3%82%924%e8%a8%98%e4%ba%8b%e3%81%8a%e3%81%8d%e3%81%ab%e8%a1%a8%e7%a4%ba/#post-81880</link>
                        <pubDate>Thu, 31 Oct 2024 06:06:28 +0000</pubDate>
                        <description><![CDATA[ありがとうございます。無事更新でき、うまく表示されました。]]></description>
                        <content:encoded><![CDATA[<p>ありがとうございます。<br />無事更新でき、うまく表示されました。</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/cocoon-theme/">Cocoonテーマに関する質問</category>                        <dc:creator>sonicau4</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/cocoon-theme/%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%aa%e3%82%b9%e3%83%88%e3%83%9f%e3%83%89%e3%83%ab%e5%ba%83%e5%91%8a%e3%82%924%e8%a8%98%e4%ba%8b%e3%81%8a%e3%81%8d%e3%81%ab%e8%a1%a8%e7%a4%ba/#post-81880</guid>
                    </item>
				                    <item>
                        <title>RE: インデックスリストミドル広告を4記事おきに表示させるようにしたい</title>
                        <link>https://wp-cocoon.com/community/cocoon-theme/%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%aa%e3%82%b9%e3%83%88%e3%83%9f%e3%83%89%e3%83%ab%e5%ba%83%e5%91%8a%e3%82%924%e8%a8%98%e4%ba%8b%e3%81%8a%e3%81%8d%e3%81%ab%e8%a1%a8%e7%a4%ba/#post-81879</link>
                        <pubDate>Thu, 31 Oct 2024 05:57:20 +0000</pubDate>
                        <description><![CDATA[●回答
 
添付の投稿ですが、大分古い時代の親テーマのことですね。現在、公告表示のフルターフックが追加されているので、これを活用すます。
 
 
以下のコードをfunctions.phpに追加します。

add_filter(&#039;is_index_middle_widget_visible&#039;, function($is_visible, $count) {
  $...]]></description>
                        <content:encoded><![CDATA[<div>●回答</div>
<div> </div>
<div>添付の投稿ですが、大分古い時代の親テーマのことですね。<br />現在、公告表示のフルターフックが追加されているので、これを活用すます。</div>
<div> </div>
<div>https://github.com/xserver-inc/cocoon/blob/52f3d3521e275c0e422aa55453f0eefaff7ad5fa/lib/ad.php#L241-L260</div>
<div> </div>
<div>以下のコードをfunctions.phpに追加します。</div>
<div>
<pre contenteditable="false">add_filter('is_index_middle_widget_visible', function($is_visible, $count) {
  $is_visible = false;

  // 記事の表示数が4の倍数の後ろに広告を表示
  if ($count % 4 == 0) {
    $is_visible = true;
  }
  return $is_visible;
}, 10, 2);
</pre>
</div>
<div id="wpfa-41070" class="wpforo-attached-file"><a class="wpforo-default-attachment" href="//wp-cocoon.com/wp-content/uploads/wpforo/default_attachments/1730354458-WordPress-FLOWER-COMPANY-10-31-2024_02_59_PM.png" target="_blank" title="WordPress-FLOWER-COMPANY-10-31-2024_02_59_PM.png"><i class="fas fa-paperclip"></i>&nbsp;WordPress-FLOWER-COMPANY-10-31-2024_02_59_PM.png</a></div>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/cocoon-theme/">Cocoonテーマに関する質問</category>                        <dc:creator>大門未知子</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/cocoon-theme/%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%aa%e3%82%b9%e3%83%88%e3%83%9f%e3%83%89%e3%83%ab%e5%ba%83%e5%91%8a%e3%82%924%e8%a8%98%e4%ba%8b%e3%81%8a%e3%81%8d%e3%81%ab%e8%a1%a8%e7%a4%ba/#post-81879</guid>
                    </item>
				                    <item>
                        <title>インデックスリストミドル広告を4記事おきに表示させるようにしたい</title>
                        <link>https://wp-cocoon.com/community/cocoon-theme/%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%aa%e3%82%b9%e3%83%88%e3%83%9f%e3%83%89%e3%83%ab%e5%ba%83%e5%91%8a%e3%82%924%e8%a8%98%e4%ba%8b%e3%81%8a%e3%81%8d%e3%81%ab%e8%a1%a8%e7%a4%ba/#post-81878</link>
                        <pubDate>Thu, 31 Oct 2024 05:14:54 +0000</pubDate>
                        <description><![CDATA[無知ですみません。
を参考に「インデックスリストミドル広告を3記事おきに表示」から「4記事おきに表示」に変更したいのですが、3のところを4、6のところを8に変更したところ、エラーが出て更新できません。コードそのままだと、更新され、表示も問題ありません。
4記事ごとに変更するにはどうすれば良いですか？]]></description>
                        <content:encoded><![CDATA[<p>無知ですみません。</p>
<p>https://wp-cocoon.com/community/customs/%E3%82%A4%E3%83%B3%E3%83%87%E3%83%83%E3%82%AF%E3%82%B9%E3%83%AA%E3%82%B9%E3%83%88%E3%83%9F%E3%83%89%E3%83%AB%E5%BA%83%E5%91%8A%E3%82%923%E8%A8%98%E4%BA%8B%E3%81%8A%E3%81%8D%E3%81%AB%E8%A1%A8%E7%A4%BA/</p>
<p>を参考に「インデックスリストミドル広告を3記事おきに表示」から「4記事おきに表示」に変更したいのですが、<br />3のところを4、6のところを8に変更したところ、エラーが出て更新できません。<br />コードそのままだと、更新され、表示も問題ありません。</p>
<p>4記事ごとに変更するにはどうすれば良いですか？</p>]]></content:encoded>
						                            <category domain="https://wp-cocoon.com/community/cocoon-theme/">Cocoonテーマに関する質問</category>                        <dc:creator>sonicau4</dc:creator>
                        <guid isPermaLink="true">https://wp-cocoon.com/community/cocoon-theme/%e3%82%a4%e3%83%b3%e3%83%87%e3%83%83%e3%82%af%e3%82%b9%e3%83%aa%e3%82%b9%e3%83%88%e3%83%9f%e3%83%89%e3%83%ab%e5%ba%83%e5%91%8a%e3%82%924%e8%a8%98%e4%ba%8b%e3%81%8a%e3%81%8d%e3%81%ab%e8%a1%a8%e7%a4%ba/#post-81878</guid>
                    </item>
							        </channel>
        </rss>
		