PHPackages                             themehybrid/hybrid-pagination - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. themehybrid/hybrid-pagination

ActiveLibrary[Framework](/categories/framework)

themehybrid/hybrid-pagination
=============================

Enhanced pagination add-on for the Hybrid Core framework.

1.0.4.1(4w ago)140821GPL-2.0-or-laterPHPPHP &gt;=8.2

Since Aug 1Pushed 4w ago3 watchersCompare

[ Source](https://github.com/themehybrid/hybrid-pagination)[ Packagist](https://packagist.org/packages/themehybrid/hybrid-pagination)[ Docs](https://github.com/themehybrid/hybrid-pagination)[ RSS](/packages/themehybrid-hybrid-pagination/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (4)Versions (9)Used By (1)

Hybrid\\Pagination
==================

[](#hybridpagination)

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
------------

[](#requirements)

- WordPress 7.0+.
- PHP 8.2+.
- [Composer](https://getcomposer.org/) for managing PHP dependencies.

Registration
------------

[](#registration)

Register the service provider with your application:

```
$app->register( \Hybrid\Pagination\PaginationServiceProvider::class );
```

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
-----

[](#usage)

Three contexts are supported out of the box: `posts` (the main loop), `post` (singular, multi-page posts split with `\`), 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

[](#template-tags)

The package ships procedural helpers for use directly in theme templates:

```
use function Hybrid\Pagination\display;
use function Hybrid\Pagination\render;
use function Hybrid\Pagination\pagination;

// Echoes the pagination markup.
display( 'posts' );

// Returns the pagination markup as a string.
$html = render( 'posts' );

// Returns the underlying Pagination object, letting you inspect it before output.
pagination( 'posts' )->make()->display();
```

`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

[](#resolving-from-the-container)

```
use Hybrid\Pagination\Contracts\Pagination;

$pagination = app( Pagination::class, [
    'context' => 'posts',
    'args'    => [],
] );

$pagination->make()->display();
```

### Contexts

[](#contexts)

```
// Main loop pagination.
display( 'posts' );

// Singular, multi-page post pagination (``).
display( 'post' ); // `singular` is also accepted as an alias for `post`.

// Comment pagination.
display( 'comments' );
```

### Common arguments

[](#common-arguments)

```
display( 'posts', [
    'mid_size'           => 2,
    'end_size'           => 1,
    'prev_text'          => __( 'Previous', 'my-theme' ),
    'next_text'          => __( 'Next', 'my-theme' ),
    'screen_reader_text' => __( 'Posts navigation', 'my-theme' ),
] );
```

Any argument accepted by core's `paginate_links()` is supported, alongside the following additions for controlling markup and classes:

ArgumentDefaultDescription`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

[](#filters)

```
// Filter default args for a given context, before user args are merged in.
add_filter( 'hybrid/pagination/posts/defaults', function ( $defaults ) {
    return $defaults;
} );

// Filter the final, merged args for a given context.
add_filter( 'hybrid/pagination/posts/args', function ( $args ) {
    return $args;
} );

// Filter the final rendered markup for a given context.
add_filter( 'hybrid/pagination/posts', function ( $html, $args ) {
    return $html;
}, 10, 2 );

// Filter each built page link URL (also runs through core's `paginate_links` filter).
add_filter( 'paginate_links', function ( $link ) {
    return $link;
} );
```

Swap `posts` for `post` or `comments` to target those contexts specifically.

Copyright and License
---------------------

[](#copyright-and-license)

This project is licensed under the [GNU GPL](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html), version 2 or later.

2008 – 2026 © [Theme Hybrid](https://themehybrid.com).

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance94

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 88.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~302 days

Recently: every ~271 days

Total

7

Last Release

28d ago

PHP version history (3 changes)1.0.0PHP &gt;=5.6

1.0.1PHP &gt;=7.4

1.0.4PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef868a4b45ef0263f49361744b8bb04e8f3cfcb8f3f79b274fc62823115ee596?d=identicon)[justintadlock](/maintainers/justintadlock)

---

Top Contributors

[![saas786](https://avatars.githubusercontent.com/u/1642796?v=4)](https://github.com/saas786 "saas786 (39 commits)")[![justintadlock](https://avatars.githubusercontent.com/u/1816309?v=4)](https://github.com/justintadlock "justintadlock (4 commits)")[![BrookeDot](https://avatars.githubusercontent.com/u/150348?v=4)](https://github.com/BrookeDot "BrookeDot (1 commits)")

---

Tags

wordpress

### Embed Badge

![Health badge](/badges/themehybrid-hybrid-pagination/health.svg)

```
[![Health](https://phpackages.com/badges/themehybrid-hybrid-pagination/health.svg)](https://phpackages.com/packages/themehybrid-hybrid-pagination)
```

###  Alternatives

[roots/wordpress

WordPress is open source software you can use to create a beautiful website, blog, or app.

19518.4M332](/packages/roots-wordpress)[justintadlock/hybrid-core

Hybrid Core: A framework for developing modern WordPress plugins and themes.

68618.1k7](/packages/justintadlock-hybrid-core)[themehybrid/hybrid-core

Hybrid Core: A framework for developing modern WordPress plugins and themes.

6851.3k19](/packages/themehybrid-hybrid-core)[themosis/theme

The Themosis framework boilerplate theme.

10249.0k3](/packages/themosis-theme)[justintadlock/hybrid-customize

Additional WordPress customizer controls and settings for the Hybrid Core framework.

131.8k1](/packages/justintadlock-hybrid-customize)[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1710.3k5](/packages/wpstarter-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
