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:

functions.php
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.

  1. Dynific Addons for Elementor (formerly Anywhere Elementor) icon Dynific Addons for Elementor (formerly Anywhere Elementor)70,000+ installs apply_filters( 'paginate_links', $link ) includes/helper.php:1604
  2. Site Reviews icon Site Reviews60,000+ installs apply_filters( 'paginate_links', $href ) plugin/Modules/Paginate.php:131
  3. Estatik Real Estate Plugin icon Estatik Real Estate Plugin10,000+ installs apply_filters( 'paginate_links', $link ) includes/property-functions.php:432
  4. Canvas icon Canvas9,000+ installs apply_filters( 'paginate_links', $link ) core/core-canvas-helpers.php:435
  5. CM Pop-Up icon CM Pop-Up8,000+ installs apply_filters( 'paginate_links', $link ) shared/functions.php:317
  6. Pagination Styler for WooCommerce icon Pagination Styler for WooCommerce1,000+ installs apply_filters( 'paginate_links', $link ) includes/functions.php:133
  7. MAS Elementor icon MAS Elementor800+ installs apply_filters( 'paginate_links', $link ) modules/woocommerce/classes/base-products-renderer.php:584
  8. Gutenverse News icon Gutenverse News700+ installs apply_filters( 'paginate_links', $link ) include/class/block/module/class-module-view-abstract.php:371
  9. CM Custom Reports icon CM Custom Reports100+ installs apply_filters( 'paginate_links', $link ) shared/functions.php:382
  10. Date Pagination icon Date Pagination70+ installs apply_filters( 'paginate_links', $link ) src/wp-functions.php:277
  11. Add Product Frontend for WooCommerce icon Add Product Frontend for WooCommerce70+ installs apply_filters( 'paginate_links', $link ) public/partials/bytes-myaccount-show-product-list-pagination.php:115
  12. CM Business Directory icon CM Business Directory30+ installs apply_filters( 'paginate_links', $link ) shared/functions.php:312
  13. Project Pages icon Project Pages30+ installs apply_filters( 'paginate_links', $link ) ProjectPages.php:1435
  14. Mighty Portfolio icon 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.