Ads Placement between the topics in bottom of the website

Can anybody please help me in placing ads like the below picture in my forum for mobile.

These ads are not shown on desktop but mobile-only.

I want to bring same type of ads on my site as well

Sequence

Ads
Ads
topics
Ads
topics

Any Idea on how to do this

Thanks