Extend the utility of pagination blocks #33357
Labels
[Block] Query Pagination
Affects the Query Pagination Block - used for pagination within the Query Loop Block
[Type] Enhancement
A suggestion for improvement.
There are a number of different pagination template tags that exist, with different purposes.
previous_posts_link
andnext_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
andnext_post_link
, which are designed to paginate queries that areis_singular()
. These currently have no block equivalent, as far as I'm aware.Furthermore, there is
wp_link_pages
. This also paginates queries that areis_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.
The text was updated successfully, but these errors were encountered: