Support » Fixing WordPress » Showing the last five posts in the sidebar – but only from certain categories

  • OK, I’m sure I’m missing something really obvious, but I’m banging my head against this – I want to position a sidebar box that shows the five latest posts from a small handful of categories (say, categories 1, 4 and 5), excluding all other categories.

    I’ve tried using get_posts within a loop, but it appears to be limited to a single category. And I’ve tried using query_posts, but I must be holding my mouth wrong because it’s not returning any results. Would some kind soul show me the elegant way to do this? Please?

  • The topic ‘Showing the last five posts in the sidebar – but only from certain categories’ is closed to new replies.