• 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 8 replies - 16 through 23 (of 23 total)
  • Anonymous

    Using this, is there any way that I could filter a certain category? For example, if I had a category for “announcements” and a category for “photos” how would I configure this so that only the category for “photos” displays under the “most recent” posts listing?

    Moderator Matt Mullenweg

    (@matt)

    Anonymous

    that’s not entirely what I had in mind. I wanted to not display a certain category onl under the “most recent posts” listing using the aforementioned “most recent posts” hack.

    LoganSix

    (@logansix)

    I tried to figure that out, however the problem is that posts can have multiple categories.
    So, after you call each post, you would have to check the post2category table to find out if the post had the actual category number, then you would only show the posts for the category that you wanted. You would add a new parameter on the function for the category that you wanted to see.
    I don’t know PHP well enough to add that code to the foreach $posts part of the hack. I figured you could just call another sql statement using the post Id , but for some reason I would get an error.

    mulberry

    (@mulberry)

    Is there a hack that can display most recent n post with title and part of post content? like the last comments hack.

    I’ve been trying to do something similar. At my new page here:
    https://www.zamon.net/New-Index.php I’m trying to pull the most recent post from my WordPress blog (https://zamon.net/wp) to appear over the “Post-It” note on the top right. I’m having trouble with what code should go at the top of the New-Index.php and what should be added to the body of the page. I’ve tried adding the entire loop from my themes index.php but the best I can get is a message telling me there are errors on lines such ans such. It also stops rendering the page as soon as it hits them.

    hey all,

    I have tried the code posted by anti-fuse, as well as a plugin that is supposed to display recent comments.

    they both display the comments as described, except when you click on the link to go to the article, they ALL lead to the same article! i have no idea why, i simply am copying and pasting the code onto the page!

    is this problem common, am i doing something wrong?

    thank you!

    that original post is for an older version of WP. one funny thing about the forum is that you can dig up old posts with outdated versions of WP. it’s happened to me too ??

    at any rate, i’m not sure, are you trying to list the last 10 comments or the last 10 posts? (that is what anti-fuse’s code would have done)

    just to make sure you’re looking at the right wiki, and using the right plugins for WP 1.5.x , please see:

    https://codex.www.ads-software.com/Plugins/Comments

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