wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
get_page_uri [ WordPress Function ]
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
Builds URI for a page.
Sub pages will be in the "directory" under the parent page post name.
Source
<?php
function get_page_uri($page) {
if ( ! is_object($page) )
$page = get_page($page);
$uri = $page->post_name;
// A page cannot be it's own parent.
if ( $page->post_parent == $page->ID )
return $uri;
while ($page->post_parent != 0) {
$page = get_page($page->post_parent);
$uri = $page->post_name . "/" . $uri;
}
return $uri;
}
?>
Beispiele [ wp-snippets.com ]
Top Google Suchergebnisse
- Function Reference/get page uri « WordPress Codex
Description. Builds URI for a page. Sub pages will be in the "directory" under the parent page post name. Usage. <?php get_page_uri( $page_id ) ?> ...
codex.wordpress.org - #3390 (Better get_page_uri) – WordPress Trac
I posted this ticket for trunk, but I figured I'd duplicate it here as well. This patch replaces get_page_uri with a version that only executes 1 general query instead ...
core.trac.wordpress.org - get_page_uri | A HitchHackers guide through WordPress
Feb 12, 2011 ... function get_page_uri($page) { if ( ! is_object($page) ) $page = get_page($page) ; $uri = $page->post_name; // A page cannot be it's own ...
hitchhackerguide.com - How to Get URL for Blog Page When Using Static Homepage
May 17, 2011 ... But i have bug: In me blog page for post is not front page and when i echo $ posts_page_url = get_page_uri($posts_page_id ); result is ...
www.dynamicwp.net