Why is wp_is_post_revision always false?

I know this is an old thread, but for future reference – the term “revision” in WordPress is a little confusing. It’s not the updated, or revised, post… but the older version. The most updated version is the “parent.”

So, if you’re calling the function wp_is_revision_post() on the current version of the post, it will always return false (and wp_get_post_parent_id() will return NULL) since the current post is not considered a “revision.” You will need to call it on an actual revision, (which would have a different ID from the current version of the post).

Leave a Comment