Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

How to insert adsense code after n-th paragraph of a question?

+2 votes
150 views
asked Jun 21 in Q2A Core by Badan

Hi guys,

I am using widget anywhere plugin for inserting ads to my website. This plugin is great. However, I have some very long questions such as this and I would really like to insert ads in the body of the question. I need a code that inserts an ad after let's say 3rd and 5th paragraph of the question if such paragraphs exist. I am using snow flat theme. I have almost no knowledge of php though. Can anyone help me with this? Thank you very much in advance!

commented Sep 14 by Badan
Anyone has any ideas or workarounds?

1 Answer

+1 vote
answered Sep 14 by ProThoughts
It will not be helpful plugin. There will be many questions with less description then ads will not look good.

You can try ads in sidebar or some other spots.

Here is my ads plugin, it may help you

https://github.com/ProThoughts/q2a-simple-ads-manager
commented Oct 18 by Badan
Thank you, but what about inserting ads on a specific question only? In my case it will be really helpful because I have some really long post-type questions. Is it difficult to implement this?

I think it would be really great and helpful for all users to be able to include html/js inside the questions or answers (wherever you want) but probably this is not something that can be achieved by a single plugin?
...