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 have a website about places and attractions in my country. Each place/attraction is a different custom post. On this page, i would like to add a button with the value "Check In" and if clicked by a registered user i would like to save a value in db with the: user id, post id and 1 if the button was pressed.

On the user page, i would like to show where he check in and how many times. I have allready the user page, the places pages, etc. I only need to add this feature.

It's doable? If yes, can someone help me?

LE: I don't expect that someone will just give me the code. Just point me in right direction - how to add for a custom post a custom entry in the db.

share|improve this question
This question is not very specific. Plus, what have you tried? You are expected to have researched the problem and made an attempt at solving it before posting a question. – s_ha_dum Apr 18 '13 at 16:38
Yes, i've read all the google :P - i've searched and reseached but i can find anything concrete. The ideea it's simple - when a registered user clicks a button, i need to save his name and the custom post id in the db. But i've run into a block when i've tried to save anything in db. – Mircea Moldovan Apr 18 '13 at 17:10

I've used this:

update_post_meta( $post->ID, 'your_meta_data'.$user_id, 'your_value' ); <= this will add for each user 1 field for that post, in db.

All Good :)

share|improve this answer

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.