I need help too.
Here is my code.
<?php
/*
Plugin Name: Adsense
Version: 0.1
Plugin URI: https://philhord.com/wp-hacks/adsense
Description: Inserts Google Adsense inside your posts where you see fit. Simple to use: Edit the adsense.php file to use your Adsense code instead of mine; Activate the plug-in; Click the “Adsense” button on the quicktags bar to insert the Adsense marker in your posts. Please make sure you read Google’s TOS before using this plugin!
Author: Phil Hord
Author URI: https://philhord.com
*/
/*
adsense
This function replaces <!–adsense–> tags with actual Google Adsense code
*/
function phord_insert_adsense($data) {
$tag = “<!–adsense–>”;
/**************************************************************************
** Replace this HTML code with your own customized Google Adsense code. **
**************************************************************************/
$adsense_code = ‘
<!– Begin Google Adsense code –>
<b>Your Google Adsense code should be here, but you forgot
to edit the plugins/adsense.php file and replace the code
there with your own.</b>
<script type=”text/javascript”><!–
google_ad_client = “ca-pub-7239636270959070”;
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = “468x60_as”;
google_ad_channel =””;
//–></script>
<script type=”text/javascript”
src=”https://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>
<!– End Google Adsense code –>
‘;
I tried it both ways. I edited the file before uploading it and activating it. Then I tried uploading and activating it and then editing the file using WP plug in editor. I cannot get it to work.
Did I put my adsense account info in the right place?
I have only used Blogger before and it was easier.
Do I have to remove some comments?
Can you be specific I am new to WP, although I have lots of coding experience.