Get certain number posts

<?php $posts = get_posts( “category=1&numberposts=10″ ); ?>
<?php if( $posts ) : ?>
<ul><?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
<a href=”<?php the_permalink() ?>” rel=”bookmark” title=”<?php the_title(); ?>”><?php the_title(); ?></a>
<?php endforeach; ?>
<?php endif; ?> 

 category=1&numberposts=10, means category 1, and list 10 posts

add the code at your wordpress homepage, you blog will looks more great.

if you change numberposts=10 to -1, it will show all posts under the category.

King Php Science Welcome, you are from: