0

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?

  • 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
2

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:

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.