• Anonymous

    I’m looking for a way to add (in a sidebar) quick links to the 6 or so most recent posts on my blog. I’d like the visible text of each link to be the title of the corresponding post.
    I’ve looked thru the forums and haven’t found a way to do this. Has anyone hacked such a feature?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Anonymous

    Never mind… just realized it was as simple as including the b2 post engine, with the permalink_link () variable wrapped around the the_title() variable.
    So now my question is: How do I control the number of posts in my index of recent posts? For that matter, how do I control the number appearing on the main part of the page?

    Thread Starter Anonymous

    There’s a much easier way to do it:
    <?php get_archives(‘postbypost’, 8); ?>
    This will display the last 8 posts. Change “8” to whatever number you prefer…

    Laughinglizard

    (@laughinglizard)

    Anonymous (second post on this thread, thats why names are important :-)) look for the option under your main blog admin page, under options and then under other options. That “posts_per_page” controls all the posts on the index page.

    notthatugly

    (@notthatugly)

    But is there any way of controlling the number of posts displayed within the template? I vaguely remember this being possible with b2 — something like ‘posts=5’ in the header?
    (Also, if you use get_archives to get links to the last few entries you have to choose between dates and titles, whereas if you’re using the post engine you can display both.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to add links to last X posts?’ is closed to new replies.