Home Forums General Issues How to use user field?


How to use user field?

  • Hello,

    I am totally new to wordpress and acf and I’m trying to use a user field in a post to show the author of the post. I tried to programatically add the post author id as a meta attribute in the wp_postmeta table in the folowing three ways:

    update_field('video_author', get_current_user_id(), $post_id);
    update_field('_video_author', get_current_user_id(), $post_id);
    update_field('field_59c383916102a', get_current_user_id(), $post_id); 

    Neither of these worked. The post author is not shown:

    Not shown author

    This is the result in wp_postmeta table:

    db result

    What am I doing wrong?

    Also when I click the user field no users are listed. I presume acf looks for users in either “wp_users” or “users” table, both of which contain records. However, this is shown:

    Empty listing

    Thanks in advance

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.