WordPress custom post_type
-
Hi,
I’ll using ‘sound’,’video’,’article’,’image’ custom types.
And I did a special new post function without admin panel. I am need, a post in the more type.
I’m tested it but array error:
/*find type*/ $post_type=array('article'); if(isset($post_img)) array_push($post_type, "image"); if(isset($post_vid)) array_push($post_type, "video"); if(isset($post_sou)) array_push($post_type, "sound");
…………
/*select type*/ $arrays = array( 'post_type' => $post_type,
………..
$id = wp_insert_post( $arrays, $wp_error ); /*add post*/
Simple:
localhost/?video=hello and this in localhost/article=hello
Any one help me.. Sorry for bad english ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘WordPress custom post_type’ is closed to new replies.