WordPress filter hook · part of WordPress core
paginate_links
A WordPress core filter that 14 plugins also fire themselves, running on 160K+ sites between them.
“Filters the paginated links for the given archive pages.”
How to use paginate_links
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'paginate_links', function( $link ) {
// Change $link here.
return $link;
}, 10, 1 );Argument names come from Dynific Addons for Elementor (formerly Anywhere Elementor)'s source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
14 plugins that fire paginate_links
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Dynific Addons for Elementor (formerly Anywhere Elementor)70,000+ installs
apply_filters( 'paginate_links', $link )includes/helper.php:1604 -
Site Reviews60,000+ installs
apply_filters( 'paginate_links', $href )plugin/Modules/Paginate.php:131 -
Estatik Real Estate Plugin10,000+ installs
apply_filters( 'paginate_links', $link )includes/property-functions.php:432 -
Canvas9,000+ installs
apply_filters( 'paginate_links', $link )core/core-canvas-helpers.php:435 -
CM Pop-Up8,000+ installs
apply_filters( 'paginate_links', $link )shared/functions.php:317 -
Pagination Styler for WooCommerce1,000+ installs
apply_filters( 'paginate_links', $link )includes/functions.php:133 -
MAS Elementor800+ installs
apply_filters( 'paginate_links', $link )modules/woocommerce/classes/base-products-renderer.php:584 -
Gutenverse News700+ installs
apply_filters( 'paginate_links', $link )include/class/block/module/class-module-view-abstract.php:371 -
CM Custom Reports100+ installs
apply_filters( 'paginate_links', $link )shared/functions.php:382 -
Date Pagination70+ installs
apply_filters( 'paginate_links', $link )src/wp-functions.php:277 -
Add Product Frontend for WooCommerce70+ installs
apply_filters( 'paginate_links', $link )public/partials/bytes-myaccount-show-product-list-pagination.php:115 -
CM Business Directory30+ installs
apply_filters( 'paginate_links', $link )shared/functions.php:312 -
Project Pages30+ installs
apply_filters( 'paginate_links', $link )ProjectPages.php:1435 -
Mighty PortfolioFewer than 10 installs
apply_filters( 'paginate_links', $link )inc/shortcodes.php:189
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.