Support » Plugins and Hacks » Feed filter broke in 3.1

  • I’m piping tweets onto my blog with Twitter Tools, but I don’t want my tweets in my RSS feed. They’re all in one category with id 18, and this (in functions.php) was working fine to keep them out:

    function filterFeed($query) {
        if ($query->is_feed) {
             $query->set('cat','-18');
        }
        return $query;
    }
    add_filter('pre_get_posts','filterFeed');

    That stopped working with the upgrade to 3.1. Any leads on how to fix it?

Viewing 1 replies (of 1 total)
  • Solved, thanks to impworks. I’m over flowing with gratitude. Really.

    function filterFeed($query) {
        if ($query->is_feed) {
          $query->set ('category__not_in', '18' );
        }
        return $query;
    }
    add_filter('pre_get_posts','filterFeed');
Viewing 1 replies (of 1 total)
  • The topic ‘Feed filter broke in 3.1’ is closed to new replies.