• Hey ,
    I got a small issue .
    I’m trying to create a function that uses the usermeta plugin hack ,

    $usermeta->set($user_ID, “usertable”, $ratevalue);

    All works fine , it creates the usertable and fills it with the $ratevalue value… But it fills the user_id field with the current logged user that clicked the button , I want it to fill the user_id with the POST AUTHOR id and not the current logged user .

    I have tried using the get_author_id or author_id with no success .

    Anyone got an answer ?

Viewing 1 replies (of 1 total)
  • $post = get_post(2); //where 2 is the post id
    then to get the author id and put it in the $author variable:
    $author = $post->post_author;

Viewing 1 replies (of 1 total)

The topic ‘usermeta plugin help…’ is closed to new replies.