Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend the utility of pagination blocks #33357

Closed
carlomanf opened this issue Jul 12, 2021 · 4 comments
Closed

Extend the utility of pagination blocks #33357

carlomanf opened this issue Jul 12, 2021 · 4 comments
Labels
[Block] Query Pagination Affects the Query Pagination Block - used for pagination within the Query Loop Block [Type] Enhancement A suggestion for improvement.

Comments

@carlomanf
Copy link

There are a number of different pagination template tags that exist, with different purposes.

previous_posts_link and next_posts_link are designed to paginate queries that are ! is_singular(). This is what the Query Pagination block currently does.

There are also previous_post_link and next_post_link, which are designed to paginate queries that are is_singular(). These currently have no block equivalent, as far as I'm aware.

Furthermore, there is wp_link_pages. This also paginates queries that are is_singular(), but does so in terms of intra-post pagination rather than inter-post pagination. The Page Break block is designed to work together with this template tag, but the template tag itself currently has no block equivalent, as far as I'm aware.

The easy solution is to add new blocks for these template tags, but it might be worth exploring the viability of simplifying them all into the Query Pagination block and automatically determine which kind of pagination to use in which context.

@skorasaurus skorasaurus added [Block] Query Pagination Affects the Query Pagination Block - used for pagination within the Query Loop Block [Type] Enhancement A suggestion for improvement. labels Jul 12, 2021
@ntsekouras
Copy link
Contributor

There are also previous_post_link and next_post_link, which are designed to paginate queries that are is_singular(). These currently have no block equivalent, as far as I'm aware.

Hey 👋 - there is Post Navigation Link which has block variations for next and previous post.

@carlomanf
Copy link
Author

There are also previous_post_link and next_post_link, which are designed to paginate queries that are is_singular(). These currently have no block equivalent, as far as I'm aware.

Hey 👋 - there is Post Navigation Link which has block variations for next and previous post.

Thanks for your reply. I didn't see those ones because I was testing with core version 5.8 and had the plugin deactivated.

After looking more closely, I see there is also a Table of Contents block that possibly might act as an equivalent to wp_link_pages, but I can't tell for sure because the block is temporarily de-registered. Hoping someone familiar with that block can confirm.

@ntsekouras
Copy link
Contributor

Table of contents blocks has some issues that need to be resolved first. Check this PR for more info: #29718

@carlomanf
Copy link
Author

Closing as duplicate of #29484

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Query Pagination Affects the Query Pagination Block - used for pagination within the Query Loop Block [Type] Enhancement A suggestion for improvement.
3 participants