Pagination
Displays a paginated navigation to next/previous set of posts, when applicable.
- Name:
core/query-pagination - Category: theme
- API Version: 3
- Block Type: Hybrid (static save + server enhancements)
Block Relationships
Ancestor blocks:
– core/query
Allowed inner blocks:
– core/query-pagination-previous
– core/query-pagination-numbers
– core/query-pagination-next
Attributes
Defined via the attributes property in block.json.
| Attribute | Type | Default | Description |
|---|---|---|---|
paginationArrow |
string |
"none" |
— |
showLabel |
boolean |
true |
— |
Supports
Defined via the supports property in block.json.
anchor:truealign:truereusable:falsehtml:falsebackground:gradient:true
color:spacing:padding:truemargin:trueblockGap:true
layout:allowSwitching:falseallowInheriting:falsedefault:{"type":"flex"}
typography:fontSize:truelineHeight:true
interactivity:clientNavigation:true
Context
Defined via the usesContext and providesContext properties in block.json.
Uses context:
queryIdquery
Provides context:
paginationArrow→ attributepaginationArrowshowLabel→ attributeshowLabel
Block Markup
This is a hybrid block. It saves static markup that the server may enhance during rendering.
<!-- wp:query-pagination -->
<!-- /wp:query-pagination -->
Source
- block.json (reference)
- Source directory — browse the
editandsavesource files,index.php, and more.
这篇文档对你有帮助吗?
谢谢你的反馈!