Adding Google AdSense Code to site

Hi,

I added the following code to add Google Adsense to my site and am currently waiting confirmation from Google. But upon double-checking through this forum and themeco the code I used is not coming up in search results (don’t know how I got it now).

Could you confirm I did it correctly please?

add_action( ‘wp_head’, ‘add_head_script’ );
function add_head_script(){
?>
<----my google code here---->
<?php
}

I uploaded the above to functions.php under “Additional Functions” in my child theme.

Thanks!

PS. I added my credentials to the secure note.

Hi @gebigoma,

Thanks for writing in.

I believe that it is not showing because you did not able to activate the child theme.

For more details on how to setup child theme, you can check the link below.

Hope it helps.

Let us know how it goes.

Thanks.

Oops, I didn’t know Pro needed it’s own Child Theme. Ok, so I downloaded it and activated it.

I’m waiting on Google to finish reviewing the site but in the meantime I want to make sure I put in the correct code.

Is the following code correct? I uploaded it to Pro-Child functions.php under “additional functions”.

Thanks again!

Hello There,

Thanks for updating in! Yes that is correct. Please do not forget to insert the Google Code as well.

Please let us know how it goes.

Ok cool, and yes I inserted the code in that area I specified. :slight_smile:

I’m just waiting on Google’s review process to complete so I don’t know if there’s any problems on my end yet. Google has not yet responded to me.

Thanks

Hi There,

Let us know how it goes,

If you have not known yet, PRO and X has the Google Analytics extension. You can install it under PRO > Overview > Extensions or X > Overview > Extensions.

Thanks,

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.