nyc_derek
1/31/2014 - 8:11 PM

Conditional for the_content()

Check to see if anything has been entered into the_content();

<?php $page_content = get_the_content(); //Need to use get_the_content if using the_content in a conditional
	if($page_content!=''){ ?>

		<?php the_content(); ?>

<?php } else { ?>

		<p>This displays if the_content is empty.</p>

<?php }; wp_reset_postdata(); //Ends the conditional and resets the post data ?>