get_pagenum_link WordPress Filter Hook
The get_pagenum_link WordPress hook is used to retrieve the URL for a given page number. This hook is useful for creating paginated links, such as those used in navigation menus or post archives. The get_pagenum_link hook can be used in conjunction with the WP_Query class to create custom paginated links.
apply_filters( 'get_pagenum_link', string $result , int $pagenum ) #
Filters the page number link for the current request.
Parameters
- $result
(string)The page number link.
- $pagenum
(int)The page number.
Source
Changelog
Version | Description |
---|---|
5.2.0 | Added the $pagenum argument. |
2.5.0 | Introduced. |