Category Archives: Wordpress (en)

How to add Google Adsense in WordPress child theme

To insert ads into a child theme on an Adsense site: add the following code to function.php: //////////////////////// ///Google AdSense: // add_action(‘wp_head’, ‘wpse_43672_wp_head’); function wpse_43672_wp_head(){ //Close PHP tags ?> <script data-ad-client=”ca-pub-<publisher-numberic-code>” async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script> <?php //Open PHP tags } //////////////////////// Don’t … Continue reading

Posted in Wordpress (en) | Leave a comment