function wpb_exclude_from_feed($query) { if ($query->is_feed() ) { $query->set('post__not_in', array(14805461,14808847,14808872,14808877,14808899)); } } add_action('pre_get_posts', 'wpb_exclude_from_feed');