October 28, 2012

WordPress Stand-in Text If No Content

When creating new sites for schools there’s regularly pages created that don’t actually have any content yet, as they’re just ideas or placeholders. If the site wants to go live, nobody wants to see a page with nothing on it apart from a title, or is that just me? Anyway, you can check if there is content on the page before it loads and if there isn’t replace it with something else, like a coming soon message.

} else { ?>
  Coming soon!

Leave a Reply

Your email address will not be published. Required fields are marked *