I’m programming a wordpress theme and need to make it save data, how should I have it do this? Is there a wordpress function or would I have to connect to the database on my own?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you just trying to store simple name -> value pairs?
You could check for $_POST data in your theme then use
update_option($name,$value)to save the data.update_optionwill create the row in the DB if it doesn’t exist. And get_option($name) will retrieve it.Or are you trying to store something more complex?