We created a custom post type "items" and its showing at admin end, now we want a user can insert a item from front end and this will be link to a menu item called "My Account" so a user can see his all inserted item and can add new item by clicking a link "Add New Item".

How can we achieve this, any help will be highly appreciated.

| improve this question | | | | |

I know the community prefers coded answers rather than a plug-in alternative. Especially since alot of frontend dedicated plug-ins are bloated or fail to accomplish most users desires.

But I would recommend a combination of Gravity forms, which is well supported and documented, this will give you or your client easily manageable front facing forms which can submit to a custom post type and/or custom fields.

Gravity sticky List - which will extend Gravity forms and allow front-end editing and/or display of already submitted forms/posts.

| improve this answer | | | | |

I did something recently like that.

Try this plugin WP User Frontend (http://wordpress.org/plugins/wp-user-frontend/)

The free version will let you do what you need.

| improve this answer | | | | |

Try This Custom Code For Create Post From Front End

Insert Data in Custom Post From Front End

if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == "product") {

    $title     = $_POST['title'];
    $post_type = 'product';
    //the array of arguements to be inserted with wp_insert_post
    $front_post = array(
    'post_title'    => $title,
    'post_status'   => 'publish',          
    'post_type'     => $post_type 

    //insert the the post into database by passing $new_post to wp_insert_post
    //store our post ID in a variable $pid
    $post_id = wp_insert_post($front_post);
    //we now use $pid (post id) to help add out post meta data
    update_post_meta($post_id, "short_description", @$_POST["short_description"]);
    update_post_meta($post_id, "price", @$_POST["price"]);
    update_post_meta($post_id, "length", @$_POST["length"]);

HTML Code Here

<form method="POST">
<label>Product Name</label>
        <input type="text" value="" class="input-xlarge" name='title'>
        <label>Product Description</label>
        <textarea value="" rows="3" class="input-xlarge" name='short_description'>
        <input type="text" value="" class="input-xlarge" name='price'>
        <label>Dimensions (in):</label>
        <input type="text" value="" class="input-xlarge" name='length' placeholder="Length">
            <button class="btn btn-primary">Add Product</button>
        <input type="hidden" name="action" value="product" />
| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.