Archived topic
How to add AdSense Ad Code after Second Paragraph to all Blog Posts
2 replies · Started by Pintu on August 20, 2022
Hi, I'm using AdSense Auto Ads on my site and I'm happy with that. With Auto Ads, I don't need to set up ads manually and don't need any plugins to do so. However, I want to add one specific Ad unit after the second paragraph to all my blog posts.
I know there are many plugins that will do the job but since I just need to add only one manual ad, I wanted to learn if there are other ways without plugin, that will automatically add the ad code to every single post after the second paragraph. Thanks.
Is there any code that I could add to the Hook and make that happen?
Hi there,
This is the closest solution without a plugin but it will require you to add it manually in every post:
https://generatepress.com/forums/topic/element-after-first-paragraph/#post-1937353
If that doesn't work for you then you will need to use a plugin.
Hope this helps.