get_page_link [ WordPress Function ]
get_page_link ( $id = false, $leavename = false, $sample = false )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Retrieve the permalink for current page or page ID.
Respects page_on_front. Use this one.
Source
<?php
function get_page_link( $id = false, $leavename = false, $sample = false ) {
global $post;
$id = (int) $id;
if ( !$id )
$id = (int) $post->ID;
if ( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') )
$link = home_url('/');
else
$link = _get_page_link( $id , $leavename, $sample );
return apply_filters('page_link', $link, $id, $sample);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- Function Reference/get page link « WordPress Codex
Description. Retrieves the permalink for the current page (if in The Loop) or any arbitrary page ID if passed as the first argument. All arguments are optional.
codex.wordpress.org - WordPress › Support » get_page_link
Hi, i am using a get-pages function to list the titles of my pages and then i list them like that: <h4>ID) ?>"><?php echo $page->post_title ?></h4> It works fine but i ...
wordpress.org - permalinks - Get page link from slug? - WordPress
Dec 7, 2010 ... Is is possible to get a page's permalink from the slug alone? I'm aware that you can get the page's permalink from the ID using get_page_link() : ...
wordpress.stackexchange.com - get_page_link (WordPress Function) - WPSeek.com
WordPress lookup for get_page_link, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com