[Resolved] Adsense Ads are not displayed in the website

Home Forums Support Adsense Ads are not displayed in the website

Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • #1321967
    David
    Staff
    Customer Support

    There is still an adscript added to the <head> of your site.

    #1322007
    Abdul

    Hi, I have not added any code anywhere or enabled any other plugin related to Ads.can you please let me know where to check so that I can look into it.
    I did not edit the theme source or any other files.

    #1322063
    David
    Staff
    Customer Support

    Those scripts can be added in the following ways:

    1. Plugins
    2. GP Hook Element
    3. Child theme functions.php
    4. Code Snippets plugin
    5. Google Tag Manager Container

    You will need to check each of those options.

    #1322090
    Abdul

    1. Plugins – No plugins related to Ads (Check the screenshot)
    2. GP Hook Element – None (Check the screenshot)
    3. Child theme functions.php – I did not do anything on this since I don’t know where it is πŸ™‚
    4. Code Snippets plugin – None (Check the screenshot)
    5. Google Tag Manager Container – I did not even register to this (check the screenshot)

    Screenshots of current settings

    View post on imgur.com

    #1322480
    Abdul

    Hi, Any updates on this one. can you please let me know so that I can fix it and move on to the next task. πŸ™‚

    #1322489
    Tom
    Lead Developer
    Lead Developer

    Can you check the header.php file in “Appearance > Themes > Theme Editor”?

    Perhaps it was added to the template itself.

    #1322505
    Abdul

    Hi Tom

    this is what I have in that file

    <?php
    /**
     * The template for displaying the header.
     *
     * @package GeneratePress
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly.
    }
    
    ?><!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    	<meta charset="<?php bloginfo( 'charset' ); ?>">
    	<link rel="profile" href="https://gmpg.org/xfn/11">
    	<?php wp_head(); ?>
    </head>
    
    <body <?php body_class(); ?> <?php generate_do_microdata( 'body' ); ?>>
    	<?php
    	/**
    	 * wp_body_open hook.
    	 *
    	 * @since 2.3
    	 */
    	do_action( 'wp_body_open' );
    
    	/**
    	 * generate_before_header hook.
    	 *
    	 * @since 0.1
    	 *
    	 * @hooked generate_do_skip_to_content_link - 2
    	 * @hooked generate_top_bar - 5
    	 * @hooked generate_add_navigation_before_header - 5
    	 */
    	do_action( 'generate_before_header' );
    
    	/**
    	 * generate_header hook.
    	 *
    	 * @since 1.3.42
    	 *
    	 * @hooked generate_construct_header - 10
    	 */
    	do_action( 'generate_header' );
    
    	/**
    	 * generate_after_header hook.
    	 *
    	 * @since 0.1
    	 *
    	 * @hooked generate_featured_page_header - 10
    	 */
    	do_action( 'generate_after_header' );
    	?>
    
    	<div id="page" class="hfeed site grid-container container grid-parent">
    		<?php
    		/**
    		 * generate_inside_site_container hook.
    		 *
    		 * @since 2.4
    		 */
    		do_action( 'generate_inside_site_container' );
    		?>
    		<div id="content" class="site-content">
    			<?php
    			/**
    			 * generate_inside_container hook.
    			 *
    			 * @since 0.1
    			 */
    			do_action( 'generate_inside_container' );
    
    #1322558
    Abdul

    checked on the google forums and found out that the Site Kit has added the code (I think this is the reason) I have now removed it. now it says the below

    AdSense Code
    The AdSense code has not been placed on your site

    can you please check now and see if the code is removed and also guide me on how to add the Ads properly.

    #1322651
    Abdul

    Please let me know if i can manually add the code now by adding a New Element.

    will that work ?

    #1322771
    Tom
    Lead Developer
    Lead Developer

    Yes, it should work as long as you only have one block of Adsense code on the site. You can use Elements to do so πŸ™‚

    #1323412
    Abdul

    Hi, I added the code through element manually but I am not seeing any Ads on my website. can you please check and let me know how to fix it.

    #1323634
    David
    Staff
    Customer Support

    I can see the code is now correct on your site and there are no more errors.
    Have you checked your adsense account and confirmed the code has been added?

    #1323640
    Abdul

    Hi, Yes, I added the code using Elements and then enabled Auto Ads and getting 1 Ad on top of the homepage. I think it will take time to see Ads across the site. I will wait and see how it turns out. thanks for your help

    #1323833
    David
    Staff
    Customer Support
Viewing 14 posts - 16 through 29 (of 29 total)
  • You must be logged in to reply to this topic.