How Do you Insert Adsense Code?

  • Author
    Posts
  • #55579

    How do you insert Adsense Code into Php. I have adsense code that begins:

    <script

    type=”text/javascript”><!–
    google_ad_client = “pub-7330089105598518”;
    google_ad_width = 120;
    google_ad_height = 240;
    google_ad_format = “120x240_as”;
    google_ad_type = “text_image”;
    google_ad_channel = “”;
    google_color_border = “99C9FF”;
    google_color_bg = “FFFFFF”;
    google_color_link = “0000FF”;
    google_color_text = “000000”;
    google_color_url = “008000”;
    //–></script>
    <script type=”text/javascript”
    src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
    </script>

    I went on google and this is what they said:

    2) You can also implement the code using the ‘include’ function that
    PHP
    provides. For more information on this, we suggest performing a Google
    search for terms such as “PHP include function.”

    So I went and did a Google Search and this is what was said;

    Assume that you have a standard header file, called “header.php”. To include the header file in a page, use the include() function, like this:

    <html>
    <body>

    <?php include(“header.php”); ?>

    <h1>Welcome to my home page</h1>

    <p>Some text</p>

    </body>
    </html>

    My Question is I do not see anything that looks like this on my blog. Am I suppose to create <html>,</html>, if it starts with:

    <p class=”MsoNormal”><span style=”font-size: 13.5pt; color: #0033ff”> Kenpo, Kali, Jeet-kune do, Aikoda are all great martial arts that are all great ways to become physically fit. Physical Fitness is the best way to increase your (Hdl), High Density Lippoproteins. Hdl’s pick up excess cholestrol from the bloodstream and carry it back to the liver for excreation from the body. Regular exercise reduces high blood pressure and is a contributing factor in coronary heart disease (CHD),stroke, kidney failure and blindness.<o:p> </o:p></span></p>

    This Code starts with <p and ends with</p>. Where do I start. Confused?

    #56068

    timethief
    Member

    If you are trying to edit php for your blog template, and insert javascript for adsense then that means you are definitely in the wrong forum. This is the wordpress.com support forum and we run on different software than wordpress.org does.
    If you have downloaded a template from wordpress.org then please go here and ask your question http://wordpress.org/support.

    At wordpress.com:
    (1) We cannot edit our php in our templates; and
    (2) We cannot use javascript (our programming will strip the code right out); and
    (3) We cannot have adsense or other advertising on our blogs.

    If however you do have a wordpress.com blog then you will benefit by reading this post and understanding the differences between wordpress.com and wordpress.org https://en.forums.wordpress.com/topic.php?id=3700&replies=1

    #56105

    rivermaya
    Member

    hi there,
    I saw few wordpress.com blogs with Firefox/Adwords/Adsense referral button in their widgets, how they do that with Js code from Google ?

    #56109

    drmike
    Member

    Slim, we’re not allowed Adsense here at wordpress.com currently. Also javascripts are removed from user input due to security concerns as stated by TT. This is discussed in the FAQ posted at the head of the forums as well as already in the forums. Asking said question also means that you owe the moderator a steak dinner. :)

    River, staff has stated that those are adverts and should be reported to staff via feedback as affliate links are also considered against the ToS as you can profit from them. You are allowed a single affliate link though. The ones that you list are probably just normal links instead of the javascripts ones. I know the Firefox folks provide one. I could have sworn that Google did as well.

    #56390

    Hi Friends,

    recently I found that few Clicks that goes from my blog Locates to
    “http://pagead2.googlesyndication.com/pagead/iclk?sa=l&ai=BafPiX8GERtWiHaS0gAOGgP39Avy00h7YwYTyAcCNtwGwgncQAhgEIKTunwYoAjgAUNfRv8n7_____wFg5brkg6QOmAGq9agQoAGIstP6A6oBFTk0MTE5Mzk5ODQrOTkwNzcwMDgxNrIBInJlc3VtZWpvYnNhdGluZm9wYXJrLndvcmRwcmVzcy5jb226AQozMzZ4MjgwX2FzyAEB2gFyaHR0cDovL3Jlc3VtZWpvYnNhdGluZm9wYXJrLndvcmRwcmVzcy5jb20vMjAwNy8wNi8yNS9wcm9qZWN0LW1hbmFnZXItZGlyZWN0b3ItY29vcmRpbmF0b3ItM3lycy1leHAtdmFyaW91cy1za2lsbHMv4AECqQKqJ9LfQExaPsgC3IG4AqgDAegDPOgD6QboA_wD6ANK6AOiBg&num=4&adurl=http://my.monsterindia.com/create_account.html%3Fspl%3DG_SS_SSO1&client=ca-pub-3443918307802676”

    But Actually I havnt added a link like this!! and how they are getting click here from my blog? (jobsatinfopark.wordpress.com)
    Is this a hacker or something or Google does this?? What is This and How to avoid leaving click to these links from personal blogs.

    Any replies..appreciated.
    Thanks
    Bejoys Vijayan

    #56391

    raincoaster
    Member

    Is that a Referrer link, or a Click (ie an outgoing link from your blog)? That takes me to a Create a Profile Page on Monster India; did you put a link to your blog in your Monster profile? That could cause it.

    #56392

    drmike
    Member

    There’s another thread on the forums about this. It’s those adsense adverts that wp.com kicks out on occasion to nonlogged in visitors.

    Not sure why they’re showing up all od the sudden as we’ve had teh adverts for many months now.

    #56393

    timethief
    Member

    I believe this thread is the one that drmike is referring to https://en.forums.wordpress.com/topic.php?id=12774

    #56398

    oh drmike,

    I didn’t know you guys were replying to me here..
    sorry! I was not hijacking this thread..
    but what happened? why you are not a moderator now?

    #56399

    sulz
    Member

    bejoysvijayan: this thread should answer your question – https://en.forums.wordpress.com/topic.php?id=12965&page&replies=95

The topic ‘How Do you Insert Adsense Code?’ is closed to new replies.