WordPress.org

Ready to get started?Download WordPress

Forums

Get list of articles per category (6 posts)

  1. dbasulto
    Member
    Posted 8 years ago #

    Anyone knows how to get the title of last X posts from a given category? Something like restricting wp_get_archives... which shows the latest articles between a time frame, but doesnt have any categories parameter.

  2. Dgold
    Member
    Posted 8 years ago #

    this question has been asked a lot, I can't explain the exact answer but one way to do it is using Multiple Loops. So you might want to look that up in the codex.

    Start Loop 1
    Call the headlines of Category 1
    End Loop 1

    Start Loop 2
    Call the headlines of Category 8
    End Loop 2

    etc

  3. dbasulto
    Member
    Posted 8 years ago #

    so this would be like a loop inside the sidebar? can that be done?

  4. Dgold
    Member
    Posted 8 years ago #

    Yes, you can put another Loop in the sidebar. You just need to learn how to do Multiple Loops, I can't explain it. You do one loop, then you "reset" it and you can put another loop somewhere else, such as side-by-side, above/below, or in the sidebar.

  5. moshu
    Member
    Posted 8 years ago #

    There are plenty of examples (and explanations) about The_Loop and multiple Loops.

  6. dbasulto
    Member
    Posted 8 years ago #

    im not being mean, but it'd be nice if the wp_get_archives had an excluding parameter :) much easier that way...wouldnt it?

Topic Closed

This topic has been closed to new replies.

About this Topic