try to fix if in posts.php