Archived topic
Google adsense showing blank
27 replies · Started by Azedine on April 7, 2018
Hi,
It's weird, my ads are showing in all my websites with different themes except Generatepress which I find weird.
Is there something we have to activate to make it work?
Just in case, it has nothing to do with Google verification:-)
Thanks
Hi there,
Where are you adding the adsense code?
Between paragraphs.
What is the code you added?
Isn't it PHP? https://generatepress.com/forums/topic/google-site-verification-google-adsense-verification/#post-281448
I wouldn't put my code publicly, I don't think so. I would like to know if I can send it privately. Yes call me paranoid ;-)
PHP? i didn't try that.
Since, I'm using child theme as well , how can I proceed with this "Use a Child Theme
If you’re already using a child theme, you can use the functions.php file to add your PHP"
Isn't that just the generic adsense code?
Is it one of these two here? https://generatepress.com/forums/topic/google-site-verification-google-adsense-verification/#post-281304
The website is already verified.
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- whatever -->
<ins class="adsbygoogle" style="display: inline-block; width: 728px; height: 90px;" data-ad-client="ca-pub-000000000000" data-ad-slot="000000000"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Hmm can you try Tom's method here?
https://generatepress.com/forums/topic/page-header-content-cannot-save/#post-221222
Is it possible just to send you the login details to avoid the back and forth ( That's what other theme support do)
Thanks
You can through Account Issue here: https://generatepress.com/contact/
However we don't usually make changes for your site for you and would like to avoid logging in as much as possible.
This is why I'm trying to make sure all the necessary steps are done.
I believe there is a code you need to add to wp_head hook to start:
https://generatepress.com/forums/topic/code-snippets-plugin-to-add-adsense-script-getting-syntax-error/#post-331335
Have you done that?
Then I would recommend this plugin as it handles inserting ads very well:
https://en-ca.wordpress.org/plugins/ad-inserter/
I'm sorry but I don't need a plugin to make a google ad work. I had several themes with other providers and I never had to add a plugin to make google ads work. So, the plugin is not an option.
Is there a ticket# or do I have to tell the whole story again?
Thanks
How are you adding that code into your content? Just within the regular code editor?
If so, WordPress doesn't allow javascript within the code editor, and will strip out some essential parts.
This article has some methods for allowing JS in your content: https://www.godaddy.com/garage/3-ways-to-insert-javascript-into-wordpress-pages-or-posts/
If that doesn't help, feel free to email us through the contact form. Just be sure to mention this topic.
Hi Tom,
Thanks for jumping in.
I always add it on "HTML" (Visual | Html )side of wordpress post on other themes and I had no issues.
I already sent an email yesterday but no one got back to me yet.
Thanks
WordPress will still strip JS, even if it's added into the Text tab.
It's possible those other themes bypass the check, which is actually not a good thing to do by default.
That article I linked you to has some methods you can use to bypass the check.
Hi Tom,
Uhmm you are right, I better avoid doing the above, so going back to square one how can I add the google ads, I added several on GP Hooks but it's not working.
Do I have to check mark "Executer PHP"?
Is there a way to send screenshots?
Thanks