Something like this?..



<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
 <p id="post-<?php the_ID(); ?>
">
 <?php if ( has_post_thumbnail()) { ?>
 <p class="post-thumb">
 <?php the_post_thumbnail(); ?>
 </p>
 <p class="post-entry-1">
 <?php the_excerpt(); ?>
 </p>
 <? } else { ?>
 <p class="post-entry-2">
 <?php the_excerpt(); ?>
 </p>
 <?php } ?>
 </p>
 <?php endwhile; ?>
<?php else: ?>
 <p class="no-data">
 <?php _e( 'Apologies, but results were found.' ); ?>
 </p>
<?php endif; ?>



More Solution