WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hay Guys , I'm currently making a plugin so that the administrator can manage "Subscriptions" to the website. I have made a custom post type and activated it within WordPress and only allowed the title field. This works perfectly on the backend, but now i need a way for front end users to add their email address.

How would i implement this, i need to add data to the database, i could easily just write some PHP to manually add the data, but does WordPress have any calls so that i can save data to the database?

share|improve this question
not particularly clear what you're trying to do. is there any reason your users can't use the email field in their WordPress profile? How is this related to your custom post type? – anu Mar 31 '11 at 9:54
up vote 2 down vote accepted

Rake a look at wp_insert_post() which handles the insertion of new posts to the database.

and there are many example how to create posts from the front end here, here, here, here and here:

share|improve this answer
Perfect, thanks! – dotty Mar 31 '11 at 11:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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