Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_get_post_parent_id [ WordPress Function ]

wp_get_post_parent_id ( $post_ID )
Parameters:
  • (int) $post_id
Returns:
  • (int|bool) false on error
Defined at:



Returns the post's parent's post_ID

Source


<?php
function wp_get_post_parent_id$post_ID ) {
    
$post get_post$post_ID );
    if ( !
$post || is_wp_error$post ) )
        return 
false;
    return (int) 
$post->post_parent;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics