<?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/"
	>
<channel>
	<title>Comments on: The Tar Pit MP-WP theme</title>
	<atom:link href="http://thetarpit.org/2019/the-tar-pit-mp-wp-theme/feed" rel="self" type="application/rss+xml" />
	<link>http://thetarpit.org/2019/the-tar-pit-mp-wp-theme</link>
	<description>"Now I feel like I know less about what that blog is about than I did before."</description>
	<pubDate>Sat, 18 Apr 2026 11:49:25 +0000</pubDate>
	<generator>http://thetarpit.org</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: spyked</title>
		<link>http://thetarpit.org/2019/the-tar-pit-mp-wp-theme#comment-445</link>
		<dc:creator>spyked</dc:creator>
		<pubDate>Wed, 14 Oct 2020 07:28:55 +0000</pubDate>
		<guid isPermaLink="false">http://thetarpit.org/?p=333#comment-445</guid>
		<description>Meanwhile we observe that the "recent comments" functionality on the first page is utterly, utterly broken. Let's take a look at it:

&lt;pre&gt;&lt;code&gt;&#60;h2&#62;Recent comments&#60;/h2&#62;
        &#60;?php
        $args = array('status' =&#62; 'approve',
                        'number' =&#62; 30);
        $comments = get_comments($args);
        $i = 0;
        ?&#62;
        &#60;ul class="recentcomments"&#62;
                &#60;?php foreach ($comments as $comment) : ?&#62;
                &#60;?php if ($comment-&#62;comment_type == '' &#124;&#124;
                          $comment-&#62;comment_type == 'comment') : ?&#62;
                &#60;li&#62;
                &#60;a href="&#60;?php echo get_comment_link($comment- rel="nofollow"&#62;comment_ID); ?&#62;"
                   title="&#60;?php echo get_the_title($comment-&#62;comment_post_ID);
                   ?&#62;"&#62;&#60;?php echo $comment-&#62;comment_author; ?&#62;&#60;/a&#62;:·
                   &#60;span&#62;
                   &#60;?php echo wp_html_excerpt($comment-&#62;comment_content, 75);
                   ?&#62;...
                   &#60;/span&#62;
                &#60;/li&#62;
                &#60;?php ++$i;
                      if ($i &#62; 7)
                        break;
                ?&#62;
                &#60;?php endif; ?&#62;
                &#60;?php endforeach; ?&#62;
        &#60;/ul&#62;
&lt;/code&gt;&lt;/pre&gt;

Notice the error? The code takes the most recent 30 posts, regardless of post type, and only then filters out pingbacks. So if Wordpress happens to start a flood of pingbacks (for example, as a consequence to post categories being updated), then &lt;em&gt;none&lt;/em&gt; of the new non-pingback comments are displayed anymore.

The fix is pretty simple: account for post types when querying the database, and limit the query for a given post type to a given 'number'. Until that's implemented, I guess the reader will have to occasionally suffer from the lack of recent comments.</description>
		<content:encoded><![CDATA[<p>Meanwhile we observe that the "recent comments" functionality on the first page is utterly, utterly broken. Let's take a look at it:</p>
<pre><code>&lt;h2&gt;Recent comments&lt;/h2&gt;
        &lt;?php
        $args = array('status' =&gt; 'approve',
                        'number' =&gt; 30);
        $comments = get_comments($args);
        $i = 0;
        ?&gt;
        &lt;ul class="recentcomments"&gt;
                &lt;?php foreach ($comments as $comment) : ?&gt;
                &lt;?php if ($comment-&gt;comment_type == '' ||
                          $comment-&gt;comment_type == 'comment') : ?&gt;
                &lt;li&gt;
                &lt;a href="&lt;?php echo get_comment_link($comment- rel="nofollow"&gt;comment_ID); ?&gt;"
                   title="&lt;?php echo get_the_title($comment-&gt;comment_post_ID);
                   ?&gt;"&gt;&lt;?php echo $comment-&gt;comment_author; ?&gt;&lt;/a&gt;:·
                   &lt;span&gt;
                   &lt;?php echo wp_html_excerpt($comment-&gt;comment_content, 75);
                   ?&gt;...
                   &lt;/span&gt;
                &lt;/li&gt;
                &lt;?php ++$i;
                      if ($i &gt; 7)
                        break;
                ?&gt;
                &lt;?php endif; ?&gt;
                &lt;?php endforeach; ?&gt;
        &lt;/ul&gt;
</code></pre>
<p>Notice the error? The code takes the most recent 30 posts, regardless of post type, and only then filters out pingbacks. So if Wordpress happens to start a flood of pingbacks (for example, as a consequence to post categories being updated), then <em>none</em> of the new non-pingback comments are displayed anymore.</p>
<p>The fix is pretty simple: account for post types when querying the database, and limit the query for a given post type to a given 'number'. Until that's implemented, I guess the reader will have to occasionally suffer from the lack of recent comments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Footnote callback tooltips for MP-WP thetarpit Markdown plugin &#171; The Tar Pit</title>
		<link>http://thetarpit.org/2019/the-tar-pit-mp-wp-theme#comment-258</link>
		<dc:creator>Footnote callback tooltips for MP-WP thetarpit Markdown plugin &#171; The Tar Pit</dc:creator>
		<pubDate>Fri, 21 Feb 2020 09:18:08 +0000</pubDate>
		<guid isPermaLink="false">http://thetarpit.org/?p=333#comment-258</guid>
		<description>[...] mp-wp_thetarpit-theme.vpatch (spyked) (sauce) [...]</description>
		<content:encoded><![CDATA[<p>[...] mp-wp_thetarpit-theme.vpatch (spyked) (sauce) [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
