Add to the function "get_posts" the exclusion of some categories

  1. Inactive


    I don't know why, but actually the function can only show one, more than one or all categories. It could be useful to add the exclusions of one or more categories, because when it is not possible to use query_posts (out of the loop) it's really useful to have this function.

    Alessio Periloso

    PS: Actually I've hacked wp-includes/post.php to exlude one given category, I'm looking for help to exclude more categories.

    Posted: 10 years ago #
  2. Chris_K


    Ultimate Category Excluder plugin?

    Posted: 10 years ago #

  3. Inactive


    Why make a plugin when it's more logical to add it in the includes, where are other similar functions?
    I don't know, but I think it's a good idea to implement it in the includes...

    Posted: 10 years ago #
  4. Edward Caissie
    Theme Review Admin, The JellyBeen Man

    get_posts() now has exclude parameter, see codex page: http://codex.wordpress.org/Function_Reference/get_posts

    Also see ../wp-includes/post.php (line 571 WP version 2.9.2) for further reference.

    Posted: 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    4 Votes
  • Status

    This idea has been implemented