I am creating a form in front same as using in wp-admin.
there is meta boxes using .
I want to konw how I can use that meta box in front page.
right now I am using
do_action( 'do_meta_boxes', $post_type, 'normal', $post );
but it’s not working as $wp_meta_boxes; is null in front end.
How I call the boxes in front end.
Thanks in advance.
I think meta boxes are meant for the administrative interface only and the corresponding actions are only fired in the dashboard.
Instead I suggest you use a normal form, like in the example below (use this code in you page template). Note that you must sanitize the data comming from the form before saving it to the database!