_get_page_link WordPress Filter Hook

The get_page_link WordPress hook is used to retrieve the URL for a given page. This hook is useful for creating custom pagination or for linking to specific pages in your theme.

apply_filters( '_get_page_link', string $link, int $post_id ) #

Filters the permalink for a non-page_on_front page.


Parameters

$link

(string)The page's permalink.

$post_id

(int)The ID of the page.


Top ↑

Source

File: wp-includes/link-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.1.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