I'm having to design an e-commerce site where users should be able to create a product from front-end.

In WordPress, the product will simply be a post with custom fields like Price, Condition,.......

Also, from front-end, the user should be able to upload pictures.

I just need some advice from you guys. What would be the best-practice for this. I've not come across any e-commerce plugin that allow front-end posting of product. So can you please advise me

  • If you're OK with your users interacting with the Wordpress interface, you should be able to allow them to simply create Wordpress accounts on your site, which will allow them to make posts. Probably wouldn't be optimal, but it should work.
    – Nick
    Apr 18, 2012 at 19:14

2 Answers 2


I like mrwweb's suggestion, but if you are trying to do it yourself / for free, you will have to do a few things:

1) Make a new template PHP file with the forms you will need to create a new product, create a new page and assign it the template you created

2) Create your custom post type or decide to use post meta instead for your extra fields

3) In your template, use PHP to process the form and do something like this to insert it as a post in the Wordpress database:

$new_post = array(
    'post_title' => $post_title,
    'post_content' => $post_content,
    'post_status' => $post_type,
    'post_author' => $author_id,
    'post_category' => $category,
$new_post_id = wp_insert_post($new_post);
add_post_meta($new_post_id, "product_type", "tshirt");

It's a lot more work than just that code above of course, just a starting point if you were going to write the solution yourself.

  • u've set me on the rails, I think i'll go with the post meta :)
    – Noor
    Apr 19, 2012 at 3:12
  • Do you know any plugin or widget that can allow front-users to many images for a post
    – Noor
    Apr 19, 2012 at 3:26
  • Noor, do you think you can get that stuff working on your own then? I haven't found a good front end images plugin for free yet though.
    – miahelf
    Apr 19, 2012 at 7:12
  • 1
    Added post meta to the answer at the end of the code example
    – miahelf
    Apr 19, 2012 at 7:18
  • yes I'll try :), for the image gallery, I'll install NextGen Gallery and create an interface to allow users to add from front-end
    – Noor
    Apr 19, 2012 at 7:55

Gravity Forms (premium plugin) allows for easy creation of front-end forms, supports custom fields, and other various restrictions. If your product is a custom post type, you'll also need the Custom Post Type + Gravity Forms plugin. I've used both and been quite happy with the results.

  • thanks for your suggestion, I'm trying to find a free solution. I've relatively good in PHP so ii'll try to post it
    – Noor
    Apr 19, 2012 at 3:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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