在适用时,显示分页导航以访问下一组/上一组帖子。
块关系
祖先块:
– core/query
允许的内部块:
– core/query-pagination-previous
– core/query-pagination-numbers
– core/query-pagination-next
属性
通过 block.json 中的 attributes 属性定义。
支持
通过 block.json 中的 supports 属性定义。
anchor:truealign:truereusable:falsehtml:falsebackground:gradients:true
color:spacing:padding:truemargin:trueblockGap:true
layout:allowSwitching:falseallowInheriting:falsedefault:{"type":"flex"}
typography:fontSize:truelineHeight:true
interactivity:clientNavigation:true
上下文
通过 block.json 中的 usesContext 和 providesContext 属性定义。
使用的上下文:
queryIdquery
提供的上下文:
paginationArrow→ 属性paginationArrowshowLabel→ 属性showLabel
块标记
这是一个 混合块。它保存静态标记,服务器在渲染期间可能会对其进行增强。
<!-- wp:query-pagination -->
<!-- /wp:query-pagination -->
来源
- block.json (参考)
- 源目录 — 浏览
edit和save源文件、index.php等。