Support » Requests and Feedback » Feature Request: Implementation of ‘category’ a

  • get_posts() is an extremely handy function, but the ‘category’ argument hasn’t been implemented yet, which does tend to limit some if its usefulness.
    I’m implementing a linklog for my website, with entries that are really full blog posts (syndicated, comments, archived, etc – similar to the setup on However, I want my links, while remaining part of my blog, to be displayed separately from the rest of my blog entries. They’re all posted under a “linklog” category, so displaying only the linklog entries would be trivial were the ‘category’ attribute to get_posts() implemented.
    The next problem is displaying my “recent posts” list and main blog sans linklog entries. Probably the easiest way to do this would be to tell get_posts() to pull data from all categories except the linklog category. Unfortunately, get_posts() doesn’t have this functionality.
    So, should WP be able to do this? I think so, and I’ve hacked up a modified version of get_posts() that has these two features. I’m still new to PHP, so please, easy with the flames about how nasty the code is.
    You can find it at:

Viewing 1 replies (of 1 total)
  • You can already set $cat (I believe) to an inclusive or exclusive category for the next use of the posts loop (now that you can do multiple posts loops…). Some of that is changing in the newer releases, maybe moving toward using params into calls.
    If you search this site for posts related to single category or show one category or some such, there’s a dozen threads already. Also look at

Viewing 1 replies (of 1 total)
  • The topic ‘Feature Request: Implementation of ‘category’ a’ is closed to new replies.