<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel rdf:about="https://blog.zhifouli.top/index.php/feed/rss/tag/Bearsimple/">
<title>拾星漫记 - Bearsimple</title>
<link>https://blog.zhifouli.top/index.php/tag/Bearsimple/</link>
<description></description>
<items>
<rdf:Seq>
<rdf:li resource="https://blog.zhifouli.top/index.php/archives/35/"/>
<rdf:li resource="https://blog.zhifouli.top/index.php/archives/27/"/>
</rdf:Seq>
</items>
</channel>
<item rdf:about="https://blog.zhifouli.top/index.php/archives/35/">
<title>Bearsimple主题短代码使用指南</title>
<link>https://blog.zhifouli.top/index.php/archives/35/</link>
<dc:date>2025-07-25T12:39:00+08:00</dc:date>
<description>文章包含隐藏内容，请进入文章内页查看~</description>
</item>
<item rdf:about="https://blog.zhifouli.top/index.php/archives/27/">
<title>Bearsimple V2侧边栏分类统计计数异常修复</title>
<link>https://blog.zhifouli.top/index.php/archives/27/</link>
<dc:date>2025-07-25T10:42:00+08:00</dc:date>
<description>                                                            AI摘要       Bearsimple V2主题修复了侧边栏分类计数异常问题，通过添加代码正确计算一级分类及其子分类的文章总数，使显示结果更准确。         此内容根据文章生成，仅用于文章内容的解释与总结 Typecho主题 - Bearsimple V2侧边栏的根分类计数为0，没有正确计算和现实分类树的权值总和在sidebar.php加上统计的逻辑代码&lt;?php 
// 修复一级分类文章数显示问题：计算一级分类及其子分类的文章总数
// 原始代码只显示一级分类本身的文章数，不包括子分类的文章数
$totalCount = $categorys-&gt;count; // 一级分类本身的文章数
if (!empty($children)) {
    // 遍历所有子分类，累加它们的文章数
    foreach ($children as $mid) {
        $child = $categorys-&gt;getCategory($mid);
        $totalCount += $child[&#039;count&#039;]; // 累加子分类文章数
    }
}
?&gt;
&lt;?php if (empty($children)) { ?&gt;
    &lt;li&gt;
      &lt;div class=&quot;tree-node&quot;&gt;
        &lt;a href=&quot;&lt;?php $categorys-&gt;permalink(); ?&gt;&quot; class=&quot;category-link&quot;&gt;&lt;?php $categorys-&gt;name(); ?&gt; &lt;span class=&quot;category-count&quot;&gt;(&lt;?php echo $categorys-&gt;count(); ?&gt;)&lt;/span&gt;&lt;/a&gt;
      &lt;/div&gt;
    &lt;/li&gt;
   &lt;?php } else { ?&gt;
  &lt;li&gt;
      &lt;div class=&quot;tree-node&quot;&gt;
        &lt;span class=&quot;toggle-icon&quot;&gt;&lt;/span&gt;
        &lt;!-- 对于有子分类的一级分类，显示包含子分类文章数的总计数 --&gt;
        &lt;a href=&quot;&lt;?php $categorys-&gt;permalink(); ?&gt;&quot; class=&quot;category-link&quot;&gt;&lt;?php $categorys-&gt;name(); ?&gt; &lt;span class=&quot;category-count&quot;&gt;(&lt;?php echo $totalCount; ?&gt;)&lt;/span&gt;&lt;/a&gt;
      &lt;/div&gt;
      &lt;ul class=&quot;tree-view&quot;&gt;
          &lt;?php foreach ($children as $mid) { ?&gt;成功显示</description>
</item>
</rdf:RDF>