関数は function-parts/get_custom_post_details.php で準備
// land関連情報調査の初期設定
$current_details = get_custom_post_details();
$related_parent_post_id = find_related_parent_post_id($current_details['post_id']);
if ($related_parent_post_id !== null) {
// 関連する親投稿が見つかった場合、そのIDを使用して何かしらの操作を行う
} else {
// 関連する親投稿が見つからなかった場合の処理
}