blogger - 博客上的 flexslider - 更改源
问题描述
我想更改 Blogger 上 Flexslider 中出现的图像/帖子的来源。现在,它显示“最近的帖子”,但我只想显示具有特定标签/类别的帖子。我尝试处理以下代码,但不知道如何更改...
<script>
document.write("<script src=\"/feeds/posts/default?max-results="+numposts1+"&orderby=published&alt=json-in-script&callback=showrecentposts1\"><\/script>");
</script>
解决方案
要按标签获取帖子提要,请使用此路径/feeds/posts/default/-/labelName
替换labelName
为有效的标签名称。
<script>
document.write("<script src=\"/feeds/posts/default/-/labelName?max-results="+numposts1+"&orderby=published&alt=json-in-script&callback=showrecentposts1\"><\/script>");
</script>
推荐阅读
- c++ - C ++中的分段错误错误
- apache-kafka - 动物园管理员弹性
- javascript - Gridsome 项目托管在 netlify 上。点击时,即使 URL 更新,页面也不会加载
- java - 如何获取edittext变量:java android?
- ssh - 登录 SSH 时“abrt-cli status”超时
- python - 如何使用 iso 8601 和周数转换字符串日期格式
- snowflake-cloud-data-platform - 使用 Snowflake 进行 Power BI 增量刷新
- java - 如何从 Retrofit onResponse 获取数据
- haskell - 如何在 Haskell 中正确实现辅助函数
- mysql - 即使其他表上不存在也加入表