• Hi there,
    I would like to show the 10 most recent posts in the right column. Is there a hack to show the titles of the last 10 posts?
    Thanks
    Fiona

Viewing 15 replies - 1 through 15 (of 23 total)
  • I’m sure there was already one out there, but I quickly whipped one up…
    http://mtdewvirus.com/wp-hacks/

    From the Wiki:

    <?php get_archives('postbypost', '10', 'other', '

    • ', '
    • ', false); ?>

      Will give you links to the last 10 posts with

    • and
    • after them. However, it doesn’t let you customize the title of the link… (it just puts in the title of the entry as the title of the link). Ooooh, and I just found a bug in the code that I have to go report. 🙂

    Is there a way to show the last 10 posts but not the passworded ones? What about the last 10 comments, except for the passworded ones?

    @fiona,
    I’ve updated the hack to include the title and rel.

    Thread Starter fionagilbert

    (@fionagilbert)

    Great – thankyou

    The hack now has it’s own Wiki page…
    http://wiki.wordpress.org/index.php/Recent%20Posts

    I would love to use this, but I don’t want my entries that are protected to show…or the comments from those entries. 🙁 Is there a way around it?

    southerngal,
    It should only pull the published posts, private posts should not be displayed with this hack. Are you experiencing different?

    Private is different from password protected, right?

    Is it? I don’t use either, so I’ll have to do some testing with it. If published posts can have a password, I can add some code to the hacks for an option that doesn’t show any of the posts that have a password.
    @antifuse,
    Any chance you could edit your post above to fix this topic?

    I assume that password protected and private are different, as there is separate functionality for each…
    Umm… and what exactly needs fixing in my post?

    The post from Jan 30, 2004 07:46:10 is breaking the page (at least in IE it is). Might need a line break in the part surrounded by ‘code’ tags.

    SG,
    I’ve added an option to the recent posts hack and also to the recent comments hacks. By default, both of them now show published posts without a password and there is an option to turn it on to show the ones with passwords. Let me know how it works.

    Ahhh… lousy IE! Looks fine in Firebird! 😛
    I tried editing it, but it tells me “sorry, you can’t perform this action” or some such nonsense… I can edit other posts, so maybe there’s an age limit on being able to edit posts… sorry! I tried! 🙂

    You’re welcome! 🙂

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘How do I display the last 10 posts ?’ is closed to new replies.