Google Adsense not work in home page.
-
H to all,
I apologize now for my English.In my site https://blog.mondoviaggi.eu any code (I looked in the page code and is correct) google adsense I add, on the Home Page does not work, while in the remaining part of the site works all right.
Of course I am careful not to put more than 3 AD etc.
It works perfectly throughout the site, but in the home, anywhere I try to put the code, the advertisement is displayed.
-
anyone who can help me? ??
Hello @andreaguerra80,
Hope you are doing fine.
To add google adsense in home page, you can do this by adding them on widgets area. Go to “Widgets” in the Dashboard left column, and drag “TEXT” option into the Sidebar/Footer option on the right side of the Widget page. This will open a box that you can copy and drop the code you get from generating the ad code while you are in your Google Adsense get code option. You decide what size the ad will be.
By putting it in the footer areas, it will automatically show up on pretty much all the pages.Note: Google AdSense usually will require of you to have the following pages on your site:
About Us
Contact Us
Privacy Policy
Terms of Usage
EU Cookie LawRegards!!
@andreaguerra80- I have modified the code with your Google Adsense code and it’s working for me on home page as well.
Try this code in Header Ads section:<script type="text/javascript"><!-- google_ad_client = "pub-0390582519109837"; google_alternate_color = "ffffff"; google_ad_width = 790; google_ad_height = 90; google_ad_format = "auto"; google_ad_type = "text_image"; google_ad_channel = "6598659777"; //--></script> <script type="text/javascript" src="https://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
Hope this help resolve your issue.
Regards!!Hi I put the code that you gave me, but nothing, not working.
In addition, I created the theme child and you see so
header distorted
Headerfooter disappeared
footer disappearedAlso if I try to change the logo gives me loading error.
I used this code for the css files
/* Theme Name: Mondoviaggi Theme URI: https://blog.mondoviaggi.eu/mondoviaggi/ Description: Tema Mondoviaggi Author: Andrea Guerra Author URI: https://www.mondoviaggi.eu Template: profitmag Version: 1.0.0 License: GNU General Public License v2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Tags: travel, flight, transportation, transport, hotel, travel agency, light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready, Nero, Blu, Sfondo personalizzato, Colori personalizzati, Immagine personalizzata della testata, Menu personalizzato, Stile editor, Intestazione immagine in evidenza, Immagini in evidenza, Testata flessibile, Layout fluido, Template a piena larghezza, Grigio, Verde, Chiaro, Una colonna, Rosso, Layout responsive, Argento, Articolo evidenziato, Opzioni tema, Commenti nidificati, Pronto alla traduzione, Bianco Text Domain: mondoviaggi */ @import url("../profitmag/style.css");
and this for the functions.php file
<?php //*
I also tried downloading all of the father theme files in the theme child obviously excluding style.css, functions.php and screenshot.png
@andreaguerra80,
Child theme is recommended only for customizing your theme. As,you aren’t changing theme’s files, it isn’t necessary to create a child theme. So, change your theme back to profitmag parent theme.
Instead try to change the Settings-> Reading-> Front Page Displays switch another radio box to see if that actually works.Here is another troubleshooting steps:
Try deactivating all your plugins. If that resolves the issue, reactivate each one individually until you find the cause.Regards
I forgot to tell you that if I use the preview in admin, the banner ad you see sense, while on the site no.
It remains the problem child of the template that I mentioned above you.
I deactivated and reactivated one by one all the plugins.
I installed all the plugin locally to see if he could depend on the plugin but locally it all works ideally communicated.
In the admin, as written in the previous post, if you use the preview mode to make any type of change to the template, the banner on the home page you see, if I go on the site are not seen, there seems to be something that blocks the display of banners on the home page.
This problem only creates me with the google banner ad sense and in the home, if I put the banner TradeDoubler, zanox etc work.
I’m about to go crazy ??
Just discovered a new thing that the google controls. i.e. ads per page limit.
Publishers may not place more than one “large” ad unit per page.
https://support.google.com/adsense/answer/1346295#Google_ad_limit_per_page
Thus this could be applicable for your homepage too where there is 2 large ads block whereas your any inner page has just 1 large ad block and appear valid to showing ad in header.
Just try to implement only one script in your homepage and check. It should work!.
Hi I just put a single ad ..
It does not work either.
You can check for yourself.
P.S.se even put ads in the same format in other pages, still work, the problem occurs only on the home page.
Strangely enough, in the admin, if you look at the photos of the previous post, if you use the live preview from the site, the ad you see.anyone idea @wen-solutions ?
@andreaguerra80,
Try this code in child theme’s functions.php:if ( !function_exists( 'profitmag_parent_fix' ) ): function profitmag_parent_fix() { wp_enqueue_script('child_theme_script_handle', 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', array('jquery'),'1.0', true); } endif; add_action( 'wp_enqueue_scripts', 'profitmag_parent_fix', 11 );
Regards!!
Hi,
I put the code in the functions.php file by editor in the theme child, but nothing .. not the announcement comes out??
@andreaguerra80- try replacing 11 by 9.
@andreaguerra80,
We have tested the Profitmag theme putting the Advertisement Google Adsense code you provided and it’s showing fine on Home Page.You can see the screenshot of Google Adsense Code on our Home Page.
https://prnt.sc/afxc0dGo through these troubleshooting steps:-
First of all make Back up of your current Profitmag theme in your desktop or server and Go through following three troubleshooting steps 1 by 1.
You should consider Changing to default Profit theme using following Steps:
1.Click on Appearance >> Themes >> Activate other theme than Profitmag theme2.Again,Click on Appearance ? Themes>> Hover the Mouse over Active theme>> Click the “Theme Details” button.
3.Click Next Arrow button on the top left side of theme until you find ProfitMag theme. Click Delete button
4.Go to Appearance ? Themes>> Add New >>Upload Fresh ProfitMag theme. Activate the theme.
Now, without installing any plugins Put your Google Sense Ad code again to see if your issue is resolved by doing so.
If the problem still continues, here is next troubleshooting step:
To rule out a plugin conflict, you could try temporarily deactivating all your plugins. Now Reactivate your plugins one-by-one ,see if your problem is solved, Then reactive all the remaining plugins 1 by 1 look at the site in between each reactivation, to find the conflict plugin that is causing error.
If none of the above troubleshooting steps resolve your issue, We recommend asking at https://productforums.google.com/forum/#!forum/adsense so the Google’s/ developers and support community can help you with this.
Thank you!!
- The topic ‘Google Adsense not work in home page.’ is closed to new replies.