Support » Fixing WordPress » Trouble modifying post metakey value from frontend

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    moderator

    The postid is not set. Put this in your form:

    <input type="hidden" name="post_id" value="'.$post->ID.'" />

    Now you can update post meta with:

    $postid = $_POST['post_id'];
    $data = $_POST['tentativeastatus'];
    update_post_meta($postid,'tentativeastatus',$data);

    Oh man you rock! That definitely solved the non-updating issue… it works like a charm.

    Moderator keesiemeijer

    (@keesiemeijer)

    moderator

    You’re welcome. Glad you got it resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trouble modifying post metakey value from frontend’ is closed to new replies.