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 ]

Google Arama Sonuçlarý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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