Support » Fixing WordPress » Add custom fields in post form

  • I have a working post form from frontend. I like to add extra custom field into my form. I have been working on with update_post_meta but can’t pull in or get the new custom field data from my form.

    Can anyone please help me out?
    Part of my form processor:

    $tags = $_POST['tags'];
    			$newtags = explode(',',$_POST['newtags']);
    			foreach ($newtags as $tag) {
    				wp_insert_term(trim($tag), 'tag');
    				$tags[] = trim($tag);
    			$post_status = 'pending';
    			if ( $options['article_status'] == '1' ) $post_status = 'publish';
    			$new_post = array(
    				'post_title' => wp_filter_nohtml_kses($_POST['title']),
    				'post_content' => $_POST['post'],
    				'post_status' => $post_status,
    				'post_author' => $user_ID,
    				'post_type' => 'post',
    				'post_category' => $_POST['cats'],
    				'tags_input' => implode(',',$tags),

  • The topic ‘Add custom fields in post form’ is closed to new replies.