在其中一个较新的Google博主模板Notable,
中,当您查看博客帖子时,Next Article
和Previous Article
按钮不存在。
This post解释了如何在博客主页上添加分页按钮以查看文章的下一个列表和上一篇文章列表,但没有在博客文章中添加类似的按钮来查看下一个和以前的文章。
Example of Main Blog Page with Pagination
Example of Blog Article needing Pagination (Highlighted in Pink)
知道如何添加此功能吗?我只想添加以前的文章'和'下一篇文章'个别博客帖子的按钮。
编辑更新了图片,希望更加清晰。
答案 0 :(得分:0)
我相信我找到了答案。只需添加
<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>