Nix get_archives() and try this:
<ul>
<?php
$allposts = get_posts('numberposts=-1');
foreach($allposts as $post) :
?>
<li><a href="<?php the_permalink(); ?> "><?php the_title(); ?></a> <?php the_time(get_settings('date_format')); ?></li>
<?php endforeach; ?>
</ul>
Info on get_posts:
http://codex.wordpress.org/Template_Tags/get_posts
Note: We steal the default date format (thanks to the internal function get_settings() ) and pass it to the_time(). See the special note on the_date() on why we have to do this. If you want to customize the date as displayed, see:
http://codex.wordpress.org/Formatting_Date_and_Time
Hello,
I put your code in my site, but now I have the comment of the first article posted and when I try to edit the post, the adress goes to the 1st article posted edit page.
What’s the problem ? I have just changed the date.
Sorry, I don’t like doing this… UP !
You might assume you haven’t provided enough info to go on. For example:
“…now I have the comment of the first article posted…“
Posted where? Huh? Are you adding something into the code I display above, say the edit_post_link() or edit_comment_link() template tags?
You can try initializing all post data elements by slipping in a call to setup_postdata() (an internal function) right after the foreach line:
foreach($allposts as $post) :
setup_postdata($post);
?>
If that doesn’t help, please provide more information on the code as it exists in your template.