自定义首页

<?php
query_posts($query_string.&cat=-10); while ( have_posts() ) : the_post(); echo '<h2>'; the_title(); echo '</h2>'; the_content(); endwhile; ?>
<?php
if ( have_posts() ) :
        query_posts($query_string.&cat=-10);
	while ( have_posts() ) : the_post();
		// Your loop code
	endwhile;
else :
	echo wpautop( 'Sorry, no posts were found' );
endif;
?>
posted @ 2014-03-24 21:44  kedarui  阅读(285)  评论(0编辑  收藏  举报