Skip to content

Instantly share code, notes, and snippets.

@bmoredrew
Forked from lepittenger/index.php
Last active April 2, 2019 18:06
Show Gist options
  • Save bmoredrew/fa8dbcdaa9d996e0261e5992c911136d to your computer and use it in GitHub Desktop.
Save bmoredrew/fa8dbcdaa9d996e0261e5992c911136d 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