ControlledChaos of Controlled Chaos Design
8/9/2016 - 6:44 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