Last active
May 4, 2018 09:05
-
-
Save htdat/76fbedaff7e8784db946e3d684718925 to your computer and use it in GitHub Desktop.
Use the "wordads_ads_txt" filter since Jetpack 6.1. See the official guide at https://developer.jetpack.com/hooks/wordads_ads_txt/
This file contains hidden or 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
<?php | |
add_filter( 'wordads_ads_txt', 'dat_wordads_ads_txt'); | |
function dat_wordads_ads_txt ($ads_txt_transient) { | |
$my_text = "#Add more texts"; | |
$my_text .= "\r\n"; // new line | |
$my_text .= "google.com, pub-0000000000000000, DIRECT, f08c47fec0942fa0"; // Edit your own text here | |
$my_text .= "\r\n \r\n"; // new line | |
return $my_text . $ads_txt_transient; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment