WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Getting started, how to display recent posts? (6 posts)

  1. warpdesign
    Member
    Posted 8 years ago #

    How do I display recent posts on my side bar? Do I need a plug-in to do that or can I configure it somehow?

  2. tsguitar
    Member
    Posted 8 years ago #

    Displaying your recent posts is what your index.php page of your theme should be doing right now. What theme are you using and do you have a link?

  3. warpdesign
    Member
    Posted 8 years ago #

    I'm using the default theme, but I'm styling it to look different. I guess my question is how many posts will it display in the main window and at what point do they go away? Is it after the current month they get archived? I only want 2 or 3 posts to display on the index.php main section and I want links to older posts to be on the sidebar (maybe the last 8 posts).

  4. whooami
    Member
    Posted 8 years ago #

  5. tsguitar
    Member
    Posted 8 years ago #

    The posts display on the main page until you write more and they go away, replaced by what else you have written. Go to Options >> Reading and that tells you how many posts will display at a time.

    You could also use a plugin to help determine how many posts will show up on any of your pages:
    http://rephrase.net/miscellany/05/perpage.phps

    I use that and it works well on WP 2.0+.

    For your other problem, the one of calling a list of the 8 other recent posts, except the 2 or 3 you've presented in your main content area, have a look at this:
    http://codex.wordpress.org/The_Loop#Multiple_Loops_in_Action

    Give it a shot and see what you can make of it. Let us know what you tried and how it turned out so we can help you nudge the code toward what you want it to do.

  6. warpdesign
    Member
    Posted 8 years ago #

    Hi, Thanks for your help. I used the information on that page to set up the loops how I wanted. No plug-ins needed. All I did was set the loops per the article above for the main page to 'showposts=2' and then I made a second loop for the sidebar that just prints the permalink and it is set to 'showposts=8'. Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags