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.


Top ↑

Source

File: wp-includes/link-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.2.0Added the $pagenum argument.
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More