Determine being on a specific page

Hello. Please help me with a question. I created news. Then posted in the site column. This news is stored in the database. That is, when you click on this news, you go to a page that contains more detailed information. And it is necessary that when you visit this page, the news disappears from the column. Kindly, help, please, how to implement it? Thank you.

Answer 1, authority 100%

In the code for displaying the banner, check the variable, for example, which will be false at first, and show the banner, and when the full news is displayed, set it to true, and hide the banner by this value. Or vice versa, whichever is more convenient.

Or if the banner shows snippets of news, then make a variable with the ID of this news, and when you check out the banner, check the variable, and do not write out with this ID.

Answer 2, authority 100%

For example, you have a news page – http://site/news?id=2

In the query that generates column data, just add
WHERE id != "$_GET['id']"so the current news will not get into your column…