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

I need a way that lets my users register they're weight (kg) and maybe % of bodyfat and save that information on each user in the DB.

Then i need a way to output that number again on the logged in user

What would be the easiest approach to do something like this?

share|improve this question
up vote 0 down vote accepted

I feel the best way to do is add two options Body weight and Body fat(%) in the user profile, and then you can show it with the user logged from the db. I guess this would be a simpler way.

share|improve this answer

If that's only about storing the current value, then check out update_user_meta and get user meta. But if you want to keep track of older entries, then I think creating new post type (register_post_type) with author_id of the user would be the way to go (each new weight record will be the new post)

share|improve this answer
thanks for the great tips, but to save each number as a post is not an option in this case – Demilio Nov 6 '13 at 8:47
Why? You can of course create your own table with these records (user_id, weight, bodyfat, timestamp) and write handlers to write and read these data, but wp_posts functions are very generic and handle these for you. – sebapalus Nov 6 '13 at 8:50

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.