Last active
March 8, 2018 09:22
-
-
Save dartiss/0e1dc4b2ba935266fd8fd9f96a51850c to your computer and use it in GitHub Desktop.
Adding AdSense Auto ads to your WordPress site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function google_autoads() { | |
?> | |
[[insert your AdSense script here]] | |
<?php | |
} | |
add_action( 'wp_head', 'google_autoads' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To add the AdSense Auto ads to your site, simply add this script to your theme's
function.php
file, inserting the JavaScript code that Google Adsense provides you where it says[[insert your AdSense script here]]
.