get_page_link
get_page_link ( $post = false, $leavename = false, $sample = false )
Parameters:- (int|WP_Post) post Optional. Post ID or object. Default uses the global `$post`.
- (bool) leavename Optional. Whether to keep the page name. Default false.
- (bool) sample Optional. Whether it should be treated as a sample permalink. Default false.
Returns:- (string) The page permalink.
Defined at: - Introduced in WordPress: 1.5.0
- Deprecated in WordPress: —
Description
Retrieves the permalink for the current page or page ID.Respects page_on_front. Use this one.