A file known as post.php is a core file in WordPress that handles post management and is essential to the…