I want to remove one post from a post feed in WordPress with CSS (screenshot attached)! The feed is made with custom fields! It is important to remove it with CSS as the posts will still be used in a different translation of the site!
function fb_exclude_filter($query) {
if ( !$query->is_admin && $query->is_feed) {
$query->set('post__not_in', array(40, 9) ); // id of page or post
}
return $query;
}
add_filter( 'pre_get_posts', 'fb_exclude_filter' );
But it doesn't work!
Any help?