Support » Plugin: Clean Archives Reloaded » [Plugin: Clean Archives Reloaded] Possible to exclude category in get_results

  • Resolved nwonderland

    (@nwonderland)


    Hi Alex,

    Is it possible to modify the get_results function to exclude a category? I noticed that in older versions, you used get_posts, but now I’m not sure how to do it for get_results. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Alex Mills

    (@viper007bond)

    It’s easier to just replace that with:

    $rawposts = get_posts( ... );

    Use the args from the old version.

    Just reinstalled an older version and made the change. It works! Thanks!

    Hey, what goes in . . . for those of us who need a clue 😉

    Plugin Author Alex Mills

    (@viper007bond)

    Replace the line in the current plugin that has $rawposts = $wpdb->... with something like this:

    $rawposts = get_posts( 'numberposts=-1&cat=-123' );

    It’ll use more memory but should do the trick.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Clean Archives Reloaded] Possible to exclude category in get_results’ is closed to new replies.