Hi,
Please add this code in loop.php file to have ads on homepage article list: http://screencast.com/t/rG7rDLmRrTD
$adcounter++;
if (is_home()) {
if ($adcounter == 5 or $adcounter == 10) {
echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]');
}
}
Please also paste the ad code in custom ad 1 or change the number of custom ad in the code(the custom ad that you want to show): http://screencast.com/t/n6omBeV0r
Hope this helps!
Once Again, thanks! I’ve made some adjustments on this code, but it did work!
Thanks!
I have this issue
instead of appearing the ads, it appears the code between the posts
Like this
[td_ad_box spot_id=”custom_ad_2″]
Check http://www.rnbjunk.com
$td_module = td_api_module::get_by_id($td_module_class);
if ($td_module[‘uses_columns’] === false) {
$td_template_layout->disable_output();
}
if (have_posts()) {
while ( have_posts() ) : the_post();
echo $td_template_layout->layout_open_element();
if (class_exists($td_module_class)) {
$td_mod = new $td_module_class($post);
echo $td_mod->render();
} else {
td_util::error(__FILE__, ‘Missing module: ‘ . $td_module_class);
}
echo $td_template_layout->layout_close_element();
$td_template_layout->layout_next();
$adcounter++;
if (is_home()) {
if ($adcounter == 4 or $adcounter == 8) {
echo do_shortcode(‘[td_ad_box spot_id=”custom_ad_2″]’);
}
}
endwhile; //end loop
echo $td_template_layout->close_all_tags();
For me the ads are loading on mobile, see here
– https://www.screencast.com/t/TqUg6dPl2Qnx
– https://www.screencast.com/t/22ibc1PsPk
– https://www.screencast.com/t/A75HZqWrymC
