Osclass forums
Support forums => Themes => Topic started by: mcsa66 on February 11, 2019, 11:36:20 am
-
Hello,
I have bought the theme gum again. I am having a configuration problem with Google Adsense. I can not insert the code provided by google between the tags <head> & / <head>. The Ads Management tab does not have this field ... Can you give me a simple way to insert it?
Thank you
-
You have to edit your theme file if you what to add something between head tags.
-
:o
Thanks for your answer, but what do you mean by editing your theme file? can you be a little more specific?
-
If you ask me this that means that you have no clue about it. Not a good start if you want to make changes on your site.
Your theme is in oc-content/themes/your-theme
Now if your site is on a live server, make sure that you make a backup before you start.
You need a FTP client to edit your theme files, or you can do this from cpanel in file manager.
https://filezilla-project.org/
https://www.youtube.com/watch?v=adxmlHDim6c
Edit from cpanel
https://www.youtube.com/watch?v=thfzSKCva9o
Remember you theme is in oc-content/themes and don't forget to make a backup before you do this
-
Thank you, but I know how to edit a file and transfer it via FTP (thankfully!).
I am on a dedicated server debian 9 at OVH in France. My English is not very good, please excuse me if I express myself badly.
Why do I need to edit a Gum theme source file while it's supposed to work with adsense?
There is a tab provided for this purpose in the theme settings ...
Should I conclude that this theme is starting to date and is not up to date to work properly with Google adsence today?
I guess you have to edit and edit the <head> tags manually from the main.php file or whatever ...
-
I don't understand your issue. You can't add google code in theme settings?
This theme has option to add adsense code in different area on the site.
-
Today, for adsense ads to be valid, you must add this code between the tags <head> ... </ head>
Code exemple :
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-XXXXXXXXXXXXXXXX",
enable_page_level_ads: true
});
</script>
When declaring his domain to google, this code is verified by their robot. If it is not present, you can not advertise. :(
-
I don't understand your issue. You can't add google code in theme settings?
This theme has option to add adsense code in different area on the site.
No, this theme is incomplete in the adsense configuration.
Unfortunately, I feel like I’ve wasted 20 euros on this theme. If we need to start changing the php code provided, I don’t see the point. >:(
-
I have never used this plugin myself, but with this you can insert your required script in header (or footer) without modifying your theme:
https://market.osclass.org/plugins/miscellaneous/insert-on-header-footer_267
Maybe that will solve your issue.
-
Thank you very much, this is a solution that should work. It's very kind of you to have communicated it to me.
I would still prefer that the theme is up to date, even if its price is relatively low. In addition, I found some writing bugs in the code with my humble level, it's quite disappointing. I therefore advise against investing in this incomplete theme as long as there is no update ... :-\