Hi,
I use the Newspaper mobile theme. In the theme panel you can place a shortcode for an ad and let it appear after a certain number of posts (default after 5 posts). I wonder if it is possible to place multiple ads. I’d like to place mobile ads after post number 3 and 5 or even more.
Is this possible?
Hi,
That is not possible at the moment, unless maybe making modifications in the mobile theme code. From what I know this is added on our list as it has been suggested before, we will try to add more inline ads for desktop and loop ads for mobile in coming updates. Sorry for the inconvenience.
Please let me know if you have more questions.
Thanks
Has there been any progress on adding this ability on both desktop post loops and more than just one loop ad on mobile?
I’m trying this in loop.php, but it’s not doing anything.
$adcounter++; if (is_category() or is_archive()) { if ($adcounter == 5 or $adcounter == 10 or $adcounter == 15 or $adcounter == 20) {
echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_1"]‘);
}
}
Site: https://www.vitalthrills.com
-
This reply was modified 6 years by
mparlevliet.
Any thoughts on my second comment? This code is based on multiple previous conversations on this forum that have been answered by tagDiv employees. Thanks.
I never thought about this, but I can probably accomplish the above by offsetting posts and just using more posts loops? That would at least work on desktop.
Hello !
Please make sure that you paste your code in the right place as you can see here: https://www.screencast.com/t/IzTze9hBzFT ; https://www.screencast.com/t/8d7yyetDbKYX
I hope this was helpful !
Thank you !
This is brilliant, thank you. I see the ads on mobile’s category and tag pages. I don’t see them on the home page (only the first ad) and the second page. They don’t start showing up until the third page and on. Is that something with my code? I tried using the is_home() command.
$adcounter++;
if (is_home() or is_category() or is_archive()) {
if ($adcounter == 10 or $adcounter == 15 or $adcounter == 20) {
echo td_global_blocks::get_instance(‘td_block_ad_box_mob’)->render(array(‘spot_id’ => ‘loop_mob’));;
}
}
