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 Ads.id Pro

    Joined:
    Nov 19, 2013
    Messages:
    490
    Likes Received:
    17
    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,791
    Likes Received:
    65
    Location:
    semarang
    cara agan ini berarti tinggal nambahin kode amp aja di dalam template wp biasa gitu kah gan?
     
  3. yosbeda

    yosbeda Ads.id Fan

    Joined:
    Apr 18, 2010
    Messages:
    150
    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,791
    Likes Received:
    65
    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 Ads.id Starter

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

    ayankcell Ads.id Fan

    Joined:
    Feb 13, 2012
    Messages:
    114
    Likes Received:
    27
    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 Newbie

    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 Ads.id Starter

    Joined:
    Mar 24, 2016
    Messages:
    72
    Likes Received:
    1
    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:
    246
    Location:
    cockpit
    Woh keren gan. lebih enak langsung hard code, tapi untuk yg advance saja.
     
  10. anangwahyudi

    anangwahyudi Hero

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

    pengensukses Super Hero

    Joined:
    Jan 13, 2014
    Messages:
    784
    Likes Received:
    42
    Location:
    Jakarta
    ini support buat AMP yang memakai product woocommerce ga gan ?
     
  12. HeXacTa

    HeXacTa Ads.id Pro

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

    addyn Ads.id Pro

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

    gvorce001 Ads.id Fan

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

    jackysan Super Hero

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

    bouya harumichi Ads.id Starter

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

    gondoruwo Ads.id Fan

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


    Terima kasih.
     
  18. tetranova

    tetranova Ads.id 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 Ads.id Starter

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

    albeniz Newbie

    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