based on those results, the if statement should be working.
I would question whether the updated pages are being uploaded to the server correctly.
on one of the pages where yo added the if statement, make a design change in the body like adding today's date then upload it again and test. If you dont see today's date on the page, the upload is failing.