Revision: 31374
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 3, 2010 18:31 by levinet
Initial Code
function get_parent_page() {
global $post;
$topParent = $post;
while ($topParent->post_parent) {
$topParent = $topParent->post_parent;
}
return get_page($topParent);
}
Initial URL
Initial Description
Returns the page object of the parent of the current page.
Initial Title
WordPress - Get Current Page Parent
Initial Tags
php, page, wordpress
Initial Language
PHP