【问题标题】:Show a specific label at 'featured' section instead of latest posts在“精选”部分显示特定标签,而不是最新帖子
【发布时间】:2018-04-22 14:47:08
【问题描述】:

我正在为我的网站使用博客模板,并且我正在尝试更改特色部分,而不是显示我想要显示特定标签的最新帖子。

我不了解,但我相信这是“控制”博客特色部分的部分:

<div class='ct-wrapper' id='featured-posts-section'>
    <div class='featured-post padding clearfix'>        
        <script type='text/javaScript'>
            document.write(&quot;&lt;script src=\&quot;/feeds/posts/default?max-results=&quot;+featured_numposts+&quot;&amp;orderby=published&amp;alt=json-in-script&amp;callback=sliderposts\&quot;&gt;&lt;\/script&gt;&quot;);
        </script>                                                                                                           
    </div>
</div>

感谢支持!

这是网站链接:https://www.santaclarabookstore.com.br/

【问题讨论】:

    标签: html blogger


    【解决方案1】:

    您需要更改 Feed URL 以指向您希望在精选版块中显示其帖子的特定标签的 Feed。假设您要显示的标签名为 labelName。那么上面的代码就会这样改变(只改变了粗体部分)——

    <script type='text/javaScript'>
    document.write(&quot;&lt;script src=\&quot;/feeds/posts/default/-/labelName?max-results=&quot;+featured_numposts+&quot;&amp;orderby=published&amp;alt=json-in-script&amp;callback=sliderposts\&quot;&gt;&lt;\/script&gt;&quot;);
    </script>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-22
      • 2012-05-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-11-01
      相关资源
      最近更新 更多