Posted By

florent on 10/21/11


Tagged

wordpress feeds categorie


Versions (?)

Exclude Category from Feeds


 / 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.