Function returns different value when called from ‘save_post’ than when called on page load April 27, 2022 by Tarik Billa Probably revisions. Check $post->post_type.