$titan = TitanFramework::getInstance(“kttbd”);
$ktt = $titan->createMetabox(array(
“name” => “Options”,
“post_type” => array(“page”),

));
$ktt->createOption(array(
“name” => “Trip duration”,
“id” => “trip_duration_days”,
“type” => “text”
));
Output: My all pages I see a MetaBox call “Trip duration”.
But I want to add only specify page not every page.

But show it on specific pages

if( is_admin() && isset( $_GET[‘post’] ) ){
global $post;
$postIDs = array(2,4,200); //set page ids for showing metabox
$post_ID = $_REQUEST[‘post’];
for($i=0;$i<count($postIDs);$i++){
if($postIDs[$i] == $post_ID){
function titan_metaboxes(){
$titan = TitanFramework::getInstance(“kttbd”);
$ktt = $titan->createMetabox(array(
“name” => “Options”,
“id” => “option_id”,
“post_type” => array(“page”),
));
$ktt->createOption(array(
“name” => “Trip duration”,
“id” => “trip_duration_days”,
“type” => “text”,
));
}
add_action(“tf_create_options”,”titan_metaboxes”);
}
}
}

Note– WordPressians