How to put an add every 2 posts?

I want to add one type of ad box but in my topic session in between 2 articles. How can I add this using plugin

kindly check the issue there

Hi Shatabdi,

Your code is not the proper way to do this, as Discourse dynamically adds posts when you scroll. You’d need to use at least Discourse Javascript API for this, and maybe a plugin, depending on what you want to achieve exactly.

Did you try Discourse Advertising? This plugin may do what you need, and then you won’t have to develop your own plugin.

Ya check that plugin. I dont want to make changes in the in built codes. I just want to make this changes using plugin only