Post types form
-
Hello
I hope everyone have a wonderful weekend.
To my problem, I have create a plugin to manage users to add cars to there owns porfile.
But I have a little problem.1, to make a select to the form that show the options in types, now i have:
<select size="1" name="wpcf-carbrands"> <option value="<?php $carbrands=get_post_meta($post->ID, 'wpcf-carbrands', true); echo $carbrands; ?>"><?php $carbrands=get_post_meta($post->ID, 'wpcf-carbrands', true); echo $carbrands; ?></option> </select>
2, to add the custom types in to the database, I have use the title and content to make it work, but need to change it to custom types.
function load_post_form() { $post_id = $this->get_post_id(); $default = array( 'title' => $_POST['bp_simple_post_title'], 'content' => $_POST['bp_simple_post_text'] ); if (!empty($post_id)) { //should we check if current user can edit this post ? $post = get_post($post_id); $args = array('title' => $post->post_title, 'content' => $post->post_content); $default = wp_parse_args($args, $default); }
I hope someone can help me….
- The topic ‘Post types form’ is closed to new replies.