The `published` flag is also valid for posts. Could you please add a similar example with posts instead of pages?