Support

Account

Home Forums General Issues Use get_field for data from particular post AND specific author Reply To: Use get_field for data from particular post AND specific author

  • Hi @fontsnob

    You can use get_post() and wp_get_current_user() to check the author and the current user. Something like this:

    $otherPost = get_post($post_id);
    $currentUser = wp_get_current_user();
    if($otherPost->post_author == $currentUser->ID){
        //do something if current user is the post author
    }

    Hope this helps.