Wordpress: If Post has content
This little chunk of code will only show the Post or Page the_content();
if there is anything. This needs to be within the the_post();
loop.
<?php if ( '' !== get_post()->post_content ) : ?> <div class="text"><?php the_content(); ?></div> <?php endif; ?>