I am trying to hide Div ads from specific page( 404, Etc). website url: https://ytdl.us/ And for an example 404 page: https://ytdl.us/search/fvl-fdslkvnfalkjfnvlkfev Here <div class="ads ads-header"> </div> needs to be blocked as it is against TOS. Can anyone help.

PS: I am no expert in coding :(

You can use CSS to hide ads. You would do something like: div class="ads ads-header" style="display:none">

However, hiding ads via CSS just makes them invisible to the end-user. The ads are still loaded. Loading ads but not letting the end-user see them is a massive TOS violation with just about every ad network. You need to ensure the Javascript for the ads does not run at all on those pages.

commented: HI Dani, I am not available with second option. That's the reason I am seeking some method that can help me in this. +0

Just a note. I went to that site and didn't see those ads, but I don't browse without Ublock Origin and Ghostery enabled. Just way too many dangers without these two.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.