Block Library: Add a Post Navigation block.#19956
Conversation
| export { metadata, name }; | ||
|
|
||
| export const settings = { | ||
| title: __( 'Post Navigation' ), |
There was a problem hiding this comment.
We'd need a decent description for this block :)
|
Is this, like, "Next Post" and "Previous Post"? Or something else? |
|
Yes |
|
I think this needs to be handled by the Query block. You don't add navigation to a single post, you add it to a query result. |
|
Take this blog post for instance https://riad.blog/2020/01/28/embrace-the-modularity/ We might consider that this is not a Core block (though that's a Core theme so we probably need it), but there's still a need for such block. |
|
The context should still be provided by a Query block even if the Query block is implicitly included in the UI for a "single" template. A post context has no notion of the list of posts it's in, so it cannot provide data for pagination UIs. |
|
Mmm, I'm not sure that the context would come from a Query block or the implicit |
In those cases, where would it come from if not the implicit |
|
Sorry, I meant to say but from the implicit |
Description
This PR adds a new Post Navigation block akin to the Post Title and Post Content blocks.
How has this been tested?
Types of Changes
New Feature: There is a new Post Navigation block for template building.
Checklist: