在一个更新的Google模板中,当您查看博客帖子时,Notable,不存在Next Article和Previous Article按钮。
这个职位解释了如何在博客主页中添加分页按钮以查看下一篇文章列表和上一篇文章列表,但没有在博客文章中添加类似的按钮来查看下一篇文章和上一篇文章。
知道如何添加此功能吗?我只是想在个人博客文章中添加“上一篇文章”和“下一篇文章”按钮。
编辑更新的图片,希望更清晰。
发布于 2018-05-21 16:40:08
我相信我找到了答案。只是需要添加
<b:if cond='data:blog.pageType == "item"'>
<b:include cond='data:newerPageUrl' name='previousPageLink'/>
<b:include cond='data:olderPageUrl' name='nextPageLink'/>
</b:if>在此代码中
<div class='post-bottom'>
<div class='post-footer'>
<!-- Footer bylines -->
<b:include name='footerBylines'/>
</div>
<b:include cond='data:view.isSingleItem and data:widget.type == "Blog"' data='{ shareButtonClass: "post-share-buttons-bottom", overridden: true }' name='maybeAddShareButtons'/>
<b:include cond='data:view.isMultipleItems or data:widget.type == "PopularPosts"' data='post' name='postJumpLink'/>
</div>就像这样
<div class='post-bottom'>
<div class='post-footer'>
<!-- Footer bylines -->
<b:include name='footerBylines'/>
</div>
<b:include cond='data:view.isSingleItem and data:widget.type == "Blog"' data='{ shareButtonClass: "post-share-buttons-bottom", overridden: true }' name='maybeAddShareButtons'/>
<b:include cond='data:view.isMultipleItems or data:widget.type == "PopularPosts"' data='post' name='postJumpLink'/>
<b:if cond='data:blog.pageType == "item"'>
<b:include cond='data:newerPageUrl' name='previousPageLink'/>
<b:include cond='data:olderPageUrl' name='nextPageLink'/>
</b:if>
</div>https://stackoverflow.com/questions/50440539
复制相似问题