1. Halo Guest, pastikan Anda selalu menaati peraturan forum sebelum mengirimkan post atau thread baru.

(ask) masukin adsense dibawah content

Discussion in 'Pemrograman Web' started by kunkinkun, Dec 18, 2010.

  1. kunkinkun

    kunkinkun Ads.id Pro

    Joined:
    Nov 21, 2010
    Messages:
    334
    Likes Received:
    5
    Location:
    google plex
    ada yang tau coding buat masukin adsense dibawah content di homepage g?
    udah ane coba eh muncul di semua content.
     
  2. comodny

    comodny Super Hero

    Joined:
    Sep 25, 2010
    Messages:
    2,311
    Likes Received:
    244
    Location:
    Jombang
    Mungkin ini bisa bantu jawab pertanyaan ente sob
    __http://ahyari.com/cara-pasang-adsense-di-wordpress/
     
  3. briyan

    briyan Super Hero

    Joined:
    Nov 17, 2009
    Messages:
    1,220
    Likes Received:
    27
    Location:
    cileungsi,BOGOR
    pake plugin "whydowork adsense" gan kalo ente pake wordpress.org
     
  4. smitadd01

    smitadd01 Super Hero

    Joined:
    Oct 17, 2010
    Messages:
    974
    Likes Received:
    123
    Location:
    Kotagede JOGJA
    kalo narohnya content urutan ke 3 ato ke 4 ada yan tahu caranya?
     
  5. kunkinkun

    kunkinkun Ads.id Pro

    Joined:
    Nov 21, 2010
    Messages:
    334
    Likes Received:
    5
    Location:
    google plex
    ke tkp gan
     
  6. Heryrhey

    Heryrhey Super Hero

    Joined:
    Nov 6, 2010
    Messages:
    1,848
    Likes Received:
    451
    Location:
    yotubmp3.com
    ijin nyimak gan :D
     
  7. dCartes

    dCartes Super Hero

    Joined:
    Jan 21, 2010
    Messages:
    1,424
    Likes Received:
    131
    Location:
    Citizen of the world
    Kalau WP pakai saja code brkt.
    Insert di file untuk nampilkan post (biasanya index.php).

    PHP:
    <?php if(is_front_page() || is_home()):?>
        <script type="text/javascript"><!--
        google_ad_client = "pub-1234567890123456";
        google_ad_slot = "1234567890";
        google_ad_width = 250;
        google_ad_height = 250;
        //-->
        </script>
        <script type="text/javascript"
        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
    <?php endif;?>
    -------------------------------------------------------------

    Kalau bukan WP, coba pake ini di filenya:

    PHP:
    <?php if(($_SERVER['REQUEST_URI'] == '/') || ($_SERVER['REQUEST_URI'] == '')):?>
        <script type="text/javascript"><!--
        google_ad_client = "pub-1234567890123456";
        google_ad_slot = "1234567890";
        google_ad_width = 250;
        google_ad_height = 250;
        //-->
        </script>
        <script type="text/javascript"
        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
    <?php endif;?>
    -------------------------------------------------------------

    Kalau mau insert di postingan WP via editor, buat aja dlm bentuk shortcode.

    PHP:
    function adsense1() {
      if(
    is_frontpage() || is_home()):
        
    $code '
        <script type="text/javascript"><!--
        google_ad_client = "pub-1234567890123456";
        google_ad_slot = "1234567890";
        google_ad_width = 250;
        google_ad_height = 250;
        //-->
        </script>
        <script type="text/javascript"
        src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
        '
    ;
      else:
        
    $code 'ini code selain adsense';
      endif;
      return 
    $code;
    }
    add_shortcode('ads1''adsense1');
    Nanti di postingan tinggal panggil pakai [ads1]
     

Share This Page