How to show different "ARTICLE TOP ADS" in category post

Posted in: Newspaper
Post count: 9

Hi,
I’d like to show different “ARTICLE TOP AD” in a specific category post.
The website is
http://www.latinacorriere.it
the category is the follwing:
http://www.latinacorriere.it/sezione/provincia/terracina/
This is a sample post:
http://www.latinacorriere.it/2015/12/16/terracina-sequestro-botti-illegali-arrestato-50enne-circeo/

I want to hide the “ARTICLE TOP AD” and replace with my “POST TEMPLATE STYLE 1” ad.
Basically I need to select different ads on different categories posts.

Post count: 6535

Hi

You need to edit td_module_single_base.php and add a condition like here: http://screencast.com/t/6PmoFo2Lwvd

if (td_util::is_ad_spot_enabled('content_top') and is_single()) {
if (in_category('you-category-name')){
echo do_shortcode('[td_block_ad_box spot_id="post_style_1"]');
}
else {
$content = td_global_blocks::get_instance('td_block_ad_box')->render(array('spot_id' => 'content_top')) . $content;
}
}

You need to replace your-category-name with the name/slug of your category.
Thanks!

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