Blogger“Notable”模板的主页底部的帖子分页链接仅显示“更多帖子”链接。它缺少“以前的帖子”。它还缺少传统的“主页”链接。 “更多帖子”链接正确地消失在帖子的最后一页上。
我希望至少启用一个“以前的帖子”链接。
这似乎是 Google 故意的,因为代码包含以下内容:
<div class='blog-pager container' id='blog-pager'> <b:include cond='data:newerPageUrl' name='previousPageLink'/> <b:include cond='data:olderPageUrl' name='nextPageLink'/> <b:include cond='data:view.url != data:blog.homepageUrl' name='homePageLink'/></div>
但在两个位置,每个代码都包含:
<b:includable id='previousPageLink'><!-- Don't show --></b:includable>
<b:includable id='homePageLink'><!-- Don't show --></b:includable>
我尝试通过首先更改此行来解决此问题:
<a expr:href='data:blog.homepageUrl'>Home</a>
唯一做的事情是“主页”链接出现在帖子的最后一页上,其中放置了“更多帖子”。无法尝试在网上找到的其他几个示例,因为它们引用了模板中不再存在的代码。
我还尝试了至少十几种第三方编号的分页编码方案,这些方案会覆盖 Blogger 的现有代码,但这些方案无法正常工作。
知道如何修复模板以启用可能有效的链接或第 3 方代码吗?
您需要更换 -
<b:includable id='previousPageLink'><!-- Don't show --></b:includable>
with
<b:includable id='previousPageLink'>
<a class='blog-pager-newer-link flat-button ripple' expr:href='data:newerPageUrl' expr:title='data:messages.newerPosts'>
<data:messages.newerPosts/>
</a>
</b:includable>
并替换
<b:includable id='homePageLink'><!-- Don't show --></b:includable>
with
<b:includable id='homePageLink'>
<a class='home-link flat-button ripple' expr:href='data:blog.homepageUrl' expr:title='data:messages.home' >
<data:messages.home/>
</a>
</b:includable>
在页面导航中显示以前的帖子(现在称为新帖子)和主页按钮。根据所使用的主题,您需要添加自定义 CSS 以使它们正确显示
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)