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

Featured [SHARE] AMP tanpa Plugins

Discussion in 'Wordpress' started by andonk.ndonk, Aug 1, 2017.

  1. BurhanSanjaya

    BurhanSanjaya AdSense Pro

    Joined:
    Nov 19, 2013
    Messages:
    491
    Likes Received:
    15
    luar biasa gan...,, saya tertarik pakai trik anda, dari dulu saya juga berpikiran sebisa mungkin jangan pakai plugin karena dapat mempengaruhi kecepatan website...,, mau tanya mas gan :
    1. Code AMP ini bisa tidak memunculkan iklan adsense?
    2. Apakah semua halaman akan terbuka versi AMP nya ketika akses menggunakan mobile, seperti halaman homepage
    3. Apa kekurangan menggunakan code agan tersebut, terimakasih

    #salam cah jogja :bye:
     
  2. nubi_GA

    nubi_GA Super Hero

    Joined:
    Oct 29, 2012
    Messages:
    1,799
    Likes Received:
    67
    Location:
    semarang
    cara agan ini berarti tinggal nambahin kode amp aja di dalam template wp biasa gitu kah gan?
     
  3. yosbeda

    yosbeda AdSense Fan

    Joined:
    Apr 18, 2010
    Messages:
    151
    Likes Received:
    43
    Location:
    Wonogiri
    Iya gan, seperti bikin custom page di WP itu lho. Bedanya, ini ada tambahan beberapa fungsi lagi di functions.php. Kalau custom page biasa kan tinggal klik pilih template mana yang mau dipakai.
     
  4. nubi_GA

    nubi_GA Super Hero

    Joined:
    Oct 29, 2012
    Messages:
    1,799
    Likes Received:
    67
    Location:
    semarang
    apa gan yang ditambahin di functions.php? trus apa ada perintah buat ngeload folder amp itu kalo misal web kita dibuka lewat hp? apa udah otomatis gitu karena dah keindex ama google? #maklumnewbibanyaktanya
     
  5. geek

    geek AdSense Starter

    Joined:
    Aug 8, 2016
    Messages:
    61
    Likes Received:
    6
    Location:
    ✖‿✖
    Thanks gan, perlu dicoba :gembira:
     
  6. ayankcell

    ayankcell AdSense Fan

    Joined:
    Feb 13, 2012
    Messages:
    118
    Likes Received:
    26
    Location:
    Tangerang Selatan
    Maaf gan, barusan nyoba di Child Theme tapi yang nongol malah 404 ya gan? apa rewrite-nya salah kali ya. Maaf awam koding :pusing:
    Ane edit sedikit kayak gini

    PHP:
    define'AMP_QUERY_VAR'apply_filters'amp_query_var''amp' ) );
    add_rewrite_endpointAMP_QUERY_VAREP_PERMALINK );
    function 
    gugel_apem$template ) {
        if( 
    get_query_varAMP_QUERY_VARfalse ) !== false ) {
            
    //definisi tentang single post, nyang     pake custom post type tinggal ditambahin lagi
               
    $template get_stylesheet_directory_uri() .  'amp/single-amp.php'// Ini ane edit ke path child theme-nya      
        
    }
         return 
    $template;
    };
    add_filter'template_include''gugel_apem'99 );
    Kira-kira apa yang salah ya gan? hehe..
     
  7. kangdalban

    kangdalban New Comer

    Joined:
    Aug 12, 2017
    Messages:
    28
    Likes Received:
    3
    amp berarti cm aktif di single doank ya, itu header utk single amp dibikin lagi ato make header bawaan themes, kl bawaan themes ntar ada code yg ga valid amp gmn?
     
  8. renkawan

    renkawan AdSense Starter

    Joined:
    Mar 24, 2016
    Messages:
    72
    Likes Received:
    2
    Location:
    http://www.leblung.com
    terima kasih sudah berbagi gan :)
    like pencetted
     
  9. be_honest

    be_honest Super Hero

    Joined:
    Jun 2, 2009
    Messages:
    1,836
    Likes Received:
    242
    Location:
    cockpit
    Woh keren gan. lebih enak langsung hard code, tapi untuk yg advance saja.
     
  10. anangwahyudi

    anangwahyudi Hero

    Joined:
    Jan 11, 2013
    Messages:
    550
    Likes Received:
    51
    Location:
    Di Hati Kamu Yang Tak Pernah Mencintaiku
    Mantap ya.. Pelajari dulu
     
  11. pengensukses

    pengensukses Super Hero

    Joined:
    Jan 13, 2014
    Messages:
    783
    Likes Received:
    37
    Location:
    Ngepet Online
    ini support buat AMP yang memakai product woocommerce ga gan ?
     
  12. HeXacTa

    HeXacTa AdSense Pro

    Joined:
    Apr 29, 2008
    Messages:
    477
    Likes Received:
    13
    thanks gan
     
  13. addyn

    addyn AdSense Pro

    Joined:
    Dec 17, 2012
    Messages:
    392
    Likes Received:
    19
    Location:
    Yogyakarta
    langsung praktek hu, makasih share nya :)
     
  14. gvorce001

    gvorce001 AdSense Fan

    Joined:
    Jul 13, 2009
    Messages:
    101
    Likes Received:
    7
    Makasih om
     
  15. jackysan

    jackysan Super Hero

    Joined:
    Nov 9, 2011
    Messages:
    900
    Likes Received:
    169
    Location:
    Lombok NTB
    Kereen banget ilmunya, ijin save ya mas
    ntar kalo ga bisa boleh konsultasi? hehee
     
  16. bouya harumichi

    bouya harumichi AdSense Starter

    Joined:
    May 4, 2014
    Messages:
    58
    Likes Received:
    4
    Location:
    Osaka
  17. gondoruwo

    gondoruwo AdSense Fan

    Joined:
    Jan 26, 2011
    Messages:
    143
    Likes Received:
    9
    Mas gan.
    boleh minta scripts templet-apem.php nya ? ndak paham isinya apaan nih.


    Terima kasih.
     
  18. tetranova

    tetranova AdSense Fan

    Joined:
    Nov 8, 2015
    Messages:
    110
    Likes Received:
    8
    Location:
    Semarang
    Pluginnya bayar gk gan ts?

    Sent from my Redmi 3X using Tapatalk
     
  19. BroServ

    BroServ AdSense Starter

    Joined:
    Feb 10, 2014
    Messages:
    64
    Likes Received:
    3
    Location:
    Jawa Barat
    Makasih gan... ijin praktekin, like kepencet :)
     
  20. albeniz

    albeniz New Comer

    Joined:
    Jun 12, 2017
    Messages:
    20
    Likes Received:
    0
    Nah ini gan yang ane cari akhirnya ketemu juga.. mantep jadi ga perlu plugin :)
     

Share This Page