S
S
Sergey2017-11-15 12:45:43
PHP
Sergey, 2017-11-15 12:45:43

How to make ad units from adsense? (ads in the feed)?


5a0c0c15bfcc1001220091.pngThere is a site (php, html, css
, js) News is fasting on it, there is a library where there is a whole list of news that looks like this: with advertising, then scroll down another 10 articles and another block, and so on ... Here is a live example, after 10 tracks there is a block with advertising, screen -
5a0c0c3a18953914181118.pngI hope I explained it intelligibly;) I would be very happy for any help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Korobkov, 2017-11-15
@BorisKorobkov

there is a 10th article after it is automatically placed a block with advertising

Something like:
foreach($topics as $i => $topic) {
   if ($i && !$i%10) { // вставить рекламу }
   // вставить статью
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question