Advertisement
BakerMan

Modified version of Tom's code

Sep 27th, 2012
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. function mlgma_my_get_posts($query) {
  2.     // Don't modify the query on an events page
  3.     if (array_key_exists('eventDisplay', $query->query_vars)) return $query;
  4.  
  5.     if (is_home() && false == $query->query_vars['suppress_filters'])
  6.         $query->set('post_type', array('post', 'Newsletter', 'attachment', TribeEvents::POSTTYPE));
  7.     return $query;
  8. }
  9.  
  10. add_filter('pre_get_posts', 'mlgma_my_get_posts');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement