Posts – display all posts except a post by an ID
Couple of issues here IIRC, exclude should be an array of ID’s as exclude get passed to WP_Query as post_not_in You are defining arguments which you don’t use. You could have simply passed that to get_posts. Rememeber, all parameters in WP_Query is available as is to get_posts as get_posts uses WP_Query You can simply use … Read more