#17: paginate_links

The paginate_links filter allows you to modify the current pagination link. Since no context is passed to the filter, it will need to be handled in your callback unless the intent is to globally affect pagination links.

It is evaluated in paginate_links() in the wp-includes/general-template.php file.

paginate_links accepts a single argument in the form a string containing the paginated link.


There is no example for this filter yet. Submit one.

One idea might to pass a custom query var for certain contexts.

Have a suggested improvement? You can fork the Gist and comment back with the link. If all is agreeable, I’ll merge in your changes. Crowd-sourced documentation FTW!

One thought on “#17: paginate_links

  1. An example usage would be to change the links to hashes like “#page2” and which could be used to “ajax” load the next set of pages into the content area. Unfort. I don’t have a full example.

Leave a Reply

Your email address will not be published. Required fields are marked *