Title: _get_page_link
Published: April 25, 2014
Last modified: May 20, 2026

---

# apply_filters( ‘_get_page_link’, string $link, int $post_id )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/_get_page_link/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/_get_page_link/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/_get_page_link/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/_get_page_link/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/_get_page_link/?output_format=md#wp--skip-link--target)

Filters the permalink for a non-page_on_front page.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/_get_page_link/?output_format=md#parameters)󠁿

 `$link`string

The page’s permalink.

`$post_id`int

The ID of the page.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/_get_page_link/?output_format=md#source)󠁿

    ```php
    return apply_filters( '_get_page_link', $link, $post->ID );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/link-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/link-template.php#L456)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/link-template.php#L456-L456)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/_get_page_link/?output_format=md#related)󠁿

| Used by | Description | 
| [_get_page_link()](https://developer.wordpress.org/reference/functions/_get_page_link/)`wp-includes/link-template.php` |

Retrieves the page permalink.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/_get_page_link/?output_format=md#changelog)󠁿

| Version | Description | 
| [2.1.0](https://developer.wordpress.org/reference/since/2.1.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2F_get_page_link%2F)
before being able to contribute a note or feedback.