This comes straight from the codex
$args = array( 'numberposts' => 5, 'offset'=> 1, 'category' => 1 );
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
according to the codex, that code should list the posts of category 1 but nothing shows up. Does this have to be inside the_loop() ?
This topic is now archived. It is frozen and cannot be changed in any way.