WordPress.org

Ready to get started?Download WordPress

Forums

How Do you Insert Adsense Code? (2 posts)

  1. slimshady22248202
    Member
    Posted 7 years ago #

    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?

  2. skarld
    Member
    Posted 7 years ago #

    I have always been able to paste the Google code directly into the themes where I want the ads to appear and have them work. Your method of a separate file and the include function would work as well or try this pugin AdSense-Deluxe: http://www.acmetech.com/blog/adsense-deluxe/.

Topic Closed

This topic has been closed to new replies.

About this Topic