>
';
the_author_posts_link();
echo ' ';
the_date();
echo ' ';
if ( comments_open() ) :
comments_popup_link( 'No Comments', '1 Comment', '% Comments', 'comments-link', '' );
echo '
';
endif;
wp_link_pages('before=&next_or_number=number&nextpagelink=»&previouspagelink=«&pagelink=%');
endwhile;
endif;
// Stop the Loop.
}
if ( is_archive() || is_author() || is_category() || is_home() ) {
// Start the Loop.
echo '';
while ( have_posts() ) : the_post();
echo '-
';
endwhile;
echo '
';
// Stop the Loop.
}
if ( is_search() ) {
// Start the Loop.
global $query_string;
$query_args = explode("&", $query_string);
$search_query = array();
foreach($query_args as $key => $string) {
$query_split = explode("=", $string);
$search_query[$query_split[0]] = urldecode($query_split[1]);
} // foreach
$the_query = new WP_Query($search_query);
echo '';
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) :
$the_query->the_post();
echo '-
';
endwhile;
wp_reset_postdata();
elseif( $the_query->have_posts() && strlen( trim(get_search_query()) ) != 0 ) :
echo ' Sorry! No posts matched your criteria.
';
else :
echo ' Sorry! No posts matched your criteria.
';
endif;
echo '
';
// Stop the Loop.
}
?>