Download the PHP package themehybrid/hybrid-pagination without Composer
On this page you can find all versions of the php package themehybrid/hybrid-pagination. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download themehybrid/hybrid-pagination
More information about themehybrid/hybrid-pagination
Files in themehybrid/hybrid-pagination
Package hybrid-pagination
Short Description Enhanced pagination add-on for the Hybrid Core framework.
License GPL-2.0-or-later
Homepage https://github.com/themehybrid/hybrid-pagination
Informations about the package hybrid-pagination
Hybrid\Pagination
Hybrid Pagination is a fork of the core WordPress paginate_links() function to give theme authors full control over the output of their pagination. Unfortunately, core doesn't give theme authors much flexibility for altering the markup and classes. This class is meant to solve this issue. It also standardizes the pagination used for posts, singular (multi-page) posts, and comments.
Requirements
- WordPress 7.0+.
- PHP 8.2+.
- Composer for managing PHP dependencies.
Registration
Register the service provider with your application:
This binds Hybrid\Pagination\Contracts\Pagination to Hybrid\Pagination\Pagination in the
container. Because it's bound to the contract rather than the concrete class, you can swap in
your own implementation by binding your own class to the same contract before this provider
registers.
Usage
Three contexts are supported out of the box: posts (the main loop), post (singular,
multi-page posts split with <!--nextpage-->), and comments. Each context pulls its own
sensible defaults (base URL, current page, total pages) from WordPress — you only need to pass
$args to override markup or behavior.
Template tags
The package ships procedural helpers for use directly in theme templates:
display() and render() are shorthand for pagination( $context, $args )->make()->display()
and ->make()->render() respectively — make() builds the $items array, display()/render()
turn it into markup.
Resolving from the container
Contexts
Common arguments
Any argument accepted by core's paginate_links() is supported, alongside the following
additions for controlling markup and classes:
| Argument | Default | Description |
|---|---|---|
container_tag |
nav |
Wrapping element tag. |
container_class |
pagination pagination--%s |
Wrapping element class (%s = context). |
title_tag |
h2 |
Title element tag. |
title_class |
pagination__title screen-reader-text |
Title element class. |
title_text |
'' |
Title text; title is omitted if empty. |
list_tag |
ul |
List element tag. |
list_class |
pagination__items |
List element class. |
item_tag |
li |
Item element tag. |
item_class |
pagination__item pagination__item--%s |
Item element class (%s = item type). |
anchor_class |
pagination__anchor pagination__anchor--%s |
Link/span class (%s = item type). |
Item types used for the %s placeholders above: link, current, dots, prev, next.
Filters
Swap posts for post or comments to target those contexts specifically.
Copyright and License
This project is licensed under the GNU GPL, version 2 or later.
2008 – 2026 © Theme Hybrid.
All versions of hybrid-pagination with dependencies
themehybrid/hybrid-contracts Version ^1.0 || ^2.0
themehybrid/hybrid-core Version ^6.0 || ^7.0