WordPress.org

Support

Support » How-To and Troubleshooting » Get list of articles per category

Get list of articles per category

  • 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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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

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

    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.

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

    im not being mean, but it’d be nice if the wp_get_archives had an excluding parameter 🙂 much easier that way…wouldnt it?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Get list of articles per category’ is closed to new replies.
Skip to toolbar