Skip to content

Can I use the same position multiple times to display ads in one page? #37

Answered by lamontef
giuliopons asked this question in Q&A
Discussion options

You must be logged in to vote

What I've found is that this solution only partially works, what has happened with my installation is that when I use this code with the ID changed, I end up with all the same ad on the page. Based on the explanation of how the code works, with the system grabbing ads sequentially from the database, if there are three ads on a page, they all will send a request for the next ad at the same time and will receive the same ad because the pointer to the next ad will not have changed.

I've found that the solution that works for me is to put a delay on each instance of the code (after the first one, that doesn't need a delay). I've had to experiment with the length of the delay for each ad to fi…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@giuliopons
Comment options

giuliopons Oct 30, 2022
Maintainer Author

Answer selected by giuliopons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants