if(have_posts('')) code example
Example 1: if (have_posts()): while(have_post()):the_post();
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
//
// Post Content here
//
} // end while
} // end if
?>
Example 2: have_posts()
NOTE: The functions, have_posts(); and the_post(); are tied to the default automatic query that wordpress makes
on its on using the current URL.