Wouldn’t <?php wp_get_archives('type=postbypost&limit=5'); ?> list the five most recent posts?
yea it would, even this would work:
<?php get_archives(‘postbypost’, ’10’); ?>
just change 10 to 5.
This
<?php get_archives(‘postbypost’, ’10’); ?>
Worked great.
Gotta love the WP community, makes customizing your site a breeze.
The thing is a lot of plugins have been overtaken by the new built in funtionality.
No way to not display current archive, huh?
For example – for use on single.php template, only display other recent posts, not the current one.
Can you, using <?php get_archives(‘postbypost’, ’10’); ?>, also use variables? E.g. I’d like to show the author too, is that possible?
Yes the code is great, but how do you get it to correctly follow the theme of your site? Ive tried i, but it looks out of place on my sidebar. For example, the entries are not bulleted and the background of its section on the sidebar is not white like the rest of the sidebar entries!
Anyone know how to fix that?
since u cant edit posts on this site ill tell u my fix lol
make sure u add
and put the code in there, then it keeps everything
yea it would, even this would work:
<?php get_archives(‘postbypost’, ’10’); ?>
just change 10 to 5. —–
Where will I paste this code?
cyberkamote:
Just post somewhere you want in sidebar.php
I wonder if this would work for getting the last number of comments as well?
To display last N comments you’ll have to roll your own code, or use a plugin:
http://codex.ww.wp.xz.cn/Plugins/Comments
How do I also list the 5 or 10 most recent posts in a sidebar while skipping the posts already present and being viewed on the frontpage with this tag ?
Thanks for any help. 🙂