$value ) { if ( $key == 'project_id' || $key == 'submit' ) continue; $project_meta[$key] = $value; } update_post_meta( $_POST['project_id'], 'anthologize_meta', $project_meta ); } function anthologize_get_project_parts($projectId) { $projectParts = new WP_Query(array('post_parent'=>$projectId, 'post_type'=>'parts')); return $projectParts->posts; } function anthologize_get_part_items($partId) { $partItems = new WP_Query(array('post_parent'=>$partId, 'post_type'=>'library_items')); return $partItems->posts; } function anthologize_display_project_content($projectId) { $parts = anthologize_get_project_parts($projectId); foreach ( $parts as $part ) { echo '