disable ads for users with some refferers

Posted in: Newspaper
Post count: 22

I need to disable ads of the top of the article for users with http referrers (for example):
news.site.ru

How can i do this?

Post count: 260

Newspaper dosnt has this option, but If you are on apache server can use htacces

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^https?://([^.]+\.)*SITEURL\.com [NC]
RewriteRule .* – [F]
</IfModule>

Post count: 22

Newspaper\includes\shortcodes\td_ad_box.php
I disable ADS for top articles then cat_id = 36578


$cat = get_the_category(get_the_ID());
$cat_id = $cat[0]->cat_ID;
if($cat_id == 36578)
{
$default_ad_sizes["content_top"]['disable_m'] = 1;
$default_ad_sizes["content_top"]['disable_tl'] = 1;
$default_ad_sizes["content_top"]['disable_tp'] = 1;
$default_ad_sizes["content_top"]['disable_p'] = 1;
}

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.