ControlledChaos
8/7/2015 - 2:39 PM

Add default text to a post or page when the_content is empty.

Add default text to a post or page when the_content is empty.

<?php
$cc = get_the_content();
if( $cc != '' ) { 
    the_content(); 
} else { ?>
  <p>My filler content goes here.</p>
<?php } ?>

Add Default Text to Posts

WordPress Snippet