For the sake of having something to work with, let’s suppose we’ve got the following query:
$args array, there’s a special parameter that allows you to exclude specific posts and pages from the query. This parameter is called
post__not_in and accepts and array of post IDs as an argument. So in the example above, this query would exclude two pages. The page with the ID of 253 and 236.