post_title is not inserted in the database.
-
Hello, everyone.
i am working on one project where i am using post_title as my link for the particular post. like my slug for that post. it means it is my link for that post. but the problem is when i try to insert the record. everything is inserted perfectly expect post_title. that become null..
here the code i am using? also i have tested that the $data array has all the value inside..
function something()
{$resume_args = array(
‘post_content’ => $data[‘resume_content’],
‘post_title’ => $data[‘title’],
‘post_name’ => sanitize_title($data[‘title’]),
‘post_status’ => ‘pending’,
‘post_type’ => ‘resume’,
‘post_author’ => $data[‘user_id’],
);$resume_id = wp_insert_post( $resume_args );
//print_r($resume_id);die;
update_post_meta( $resume_id, ‘post_name’, sanitize_title($resume_args[‘post_name’]) );
}can anyone help me what is the problem. right now i am working on it but i can not find any solution… please help me…
many thanks in advance….
- The topic ‘post_title is not inserted in the database.’ is closed to new replies.