I build a custom theme for WordPress(4.4.2). I uses the standard built-in Editor to create posts. If I create a Post with, say, a headline and a paragraph AND an image, the content is shown (so is the image). But If I just type in a title and in the content area of the editor I leave JUST the image with no further text, it will not be shown on the website.
<?php if (have_posts()) : while (have_posts()) : the_post();?>
<div class="container-fluid site-content content-area" role="main">
<div class="container">
<?php if (!empty_content($post->post_content)) :?>
<div class="content row col-md-10 xcentered">
<?php the_content(); ?>
</div>
<?php endif; ?>
</div>
</div>
<?php endwhile; endif; ?>
I also tried the code without the if statement, but the_content() does not display an image without any other content.
Everything but the div.container is rendered. And as soon as I add just a single character before/after the image title, character AND image are rendered.
Any suggestions where (else) I have to make changes? Why is an image not recognized "standalone"?