Skip to content

Instantly share code, notes, and snippets.

@lepittenger
Created June 3, 2015 14:42
Show Gist options
  • Save lepittenger/19bfceff912357023ba0 to your computer and use it in GitHub Desktop.
Save lepittenger/19bfceff912357023ba0 to your computer and use it in GitHub Desktop.
Check if the_content is empty
<?php
if ( $post->post_content=="" ) {
// do something for posts without content
} else {
// do something for posts with content
};
// OR
if ( $post->post_content!=="" ) {
// do something for posts with content
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment