Archived topic
Google Ads not Visible after Adding the Ads a Hook
9 replies · Started by Aiswarya R on September 23, 2021
I've added Google ads using Hooks-wp_head. Display rules was set for location-posts-All posts.
However, the ads are not visible. Kindly have a look at this.
Hi there,
Can you try generate_before_header instead of wp_head to test?
Let me know :)
Hi Ying
I've tried with generate_before_header, but it too doesn't make any difference.
Please have a look at the issue.
Hi there,
first disable the WP Rocket plugin and any other cache plugins you're using. Then check the site in a Private/Incognito browser to eliminate any cache/extension issues.
That worked!
Thanks, David
Is there any way I can display ads after the intro and also at other portions of the main content on the website?
Hi there,
You can create another Hook Element containing another Google Ad script and set another hook location to it.
You can use the images provided here as hook location reference - https://docs.generatepress.com/article/hooks-visual-guide/
What's the setup I should have to display ads after say 2 paragraphs?
Hi there,
i would recommend using the Ad Inserter Plugin:
okay. Thank you
I was wondering this could be done through Elements. But that's okay now. I will use the plugin.
Elements only hook into theme hooks - no inside the post content.
The Ad Inserter Plugin is the best way to go :)