Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eyecandy91/8c2a5a7ca7a910567c09f19fb989d296 to your computer and use it in GitHub Desktop.
Save eyecandy91/8c2a5a7ca7a910567c09f19fb989d296 to your computer and use it in GitHub Desktop.
Wordpress: Check if the_content is empty / do something only when the_content is empty
<?php
$thecontent = get_the_content();
if(!empty($thecontent)) { ?>
// do or output something
<?php } ?> // break php tag for HTML block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment