get_posts call only returning first post date?
-
This is what code I’m using in the default theme’s sidebar.php
<ul> <?php $myposts = get_posts('numberposts=6&category=1'); foreach($myposts as $post) : ?> <li><?php the_date(); ?> <a href="<?php the_permalink(); ?>" title="<?php the_excerpt(); ?>"><?php the_title(); ?></a></li> <?php endforeach; ?> <li> </li> </ul>
and for some reason it only return the first listed post’s date!? Please help!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘get_posts call only returning first post date?’ is closed to new replies.