Posted By

swoicik on 12/18/11


Tagged

rss feed wordpress functions


Versions (?)

Exclude Category from Feed


 / Published in: PHP
 

  1. // Custom Feed Query
  2. function customFeedquery($query) {
  3. if(is_feed()) {
  4. $query->set('cat','-8'); // exclude category 8
  5. return $query;
  6. }
  7. }
  8. add_filter('pre_get_posts', 'customFeedquery');

Report this snippet  

You need to login to post a comment.