<?php if (have_posts()) : ?>
<?php if (is_search()): ?>
<div id="listname">搜索：<?php the_search_query(); ?></div>
<?php else : ?>
<div id="listname">分类：<?php wp_title(''); ?></div>
<?php endif; ?>
<ul>
  <?php while (have_posts()) : the_post(); ?>
  <li><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
<div id="pagenavi">
<?php if (function_exists('pagenavi')) { pagenavi(); } ?>
</div>
<?php else : ?>
<div id="sorry">什么都没找到，你幸福么？</div>
<?php get_search_form(); ?>
	<div id=rand404><?php
$rand_posts = get_posts('numberposts=10&orderby=rand');
foreach( $rand_posts as $post ) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?></div>
<?php endif; ?>
