How can I avoid displaying empty the_content()?
-
I have a page.
One of the default attributes of the page, is the ‘Page’ window where u enter your blog text.
To display the content, I use the the_content() function in the follwoing code:
if (have_posts()): while (have_posts()): the_post(); echo '<div class="ui-tabs-panel">'; the_content(); '<br />'; echo '</div>'; endwhile; endif;
Question: How can I avoid displaying an empty ‘ui-tabs-panel’ if there is no test in the ‘Page’ attribute (empty content) ?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How can I avoid displaying empty the_content()?’ is closed to new replies.