Custom ad element class name

Posted in: Newspaper
Post count: 17

Hi,

at the moment I’m implementing a simple Anti-Adblock plugin from me into Newspaper WordPress site. It replaces the blocked ads inside the themes classes like “td-a-rec td-a-rec-id-custom_ad_1”. I’ve noticed all of the 5 “custom_ad” classes contain the word “ad” in their class name. These elements are blocked by adblockers while the other ad class (like the one for the sidebar) hasn’t the word “ad” in it.

So my options are either changing the class names inside the /themes/Newspaper/includes/shortcodes/td_block_ad_box.php with a code like this:


        $check_css_name = ['custom_ad_1', 'custom_ad_2', 'custom_ad_3', 'custom_ad_4', 'custom_ad_5'];
        if (in_array($spot_id, $check_css_name)){
        	$spot_id = str_replace("ad", "stealth", $spot_id);
        }

or a theme update which changes the names. I think this would be an easy and convenient change.

It would be nice if you considered it. Thanks in advance.

  • This topic was modified 8 years by euw.
Post count: 20685

Hi,

At the moment I believe there are no plans to change the name of these elements. If this is a problem for you, and you managed to find a way around it which works, you can keep using that.

Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.