Memasang random post di amp html blogger adalah salah satu cara untuk
mengatasi blog yang masih tidak bisa dipasangkan related post. Karena
Template AMP pada blogger belum men-support related post pada amp html
blogger. Untuk itu disini aku akan membagikan (tiga) 3 style cara memasang random post di template AMP blogger.
Style 1 :
Style 1 :
<amp-iframe expr:src='"https://cdn.rawgit.com/kangismet/ki-html/master/random-posts2.html?url=" + data:blog.homepageUrl' frameborder='0' height='320' layout='responsive' resizable='resizable' sandbox='allow-scripts allow-same-origin allow-modals allow-popups' width='600'>
<div aria-label='Related Posts' overflow='' role='button' tabindex='0'>Related Posts</div>
</amp-iframe>
Style 2
<amp-iframe expr:src='"https://cdn.rawgit.com/KompiAjaib/amp/master/random-posts.html?url=" + data:blog.homepageUrl' frameborder='0' height='320' layout='responsive' resizable='resizable' sandbox='allow-scripts allow-same-origin allow-modals allow-popups' width='600'>
<div aria-label='Related Posts' overflow='' role='button' tabindex='0'>Related Posts</div>
</amp-iframe>
Style 3 :
<amp-iframe frameborder='0' height='300' layout='responsive' resizable='resizable' sandbox='allow-scripts allow-same-origin allow-modals allow-popups' src='https://cdn.rawgit.com/MDCSite/mdc/master/disqusamp.html?shortname=MDCSite&url=https://mdcamp.blogspot.com/2016/11/how-to-earn-money-on-internet-quickly.html' width='600'>
<div aria-label='Disqus Comments' overflow='' role='button' tabindex='0'>Disqus Comments</div>
</amp-iframe>
Simpan kode diatas tepat di bawah kode share pada template amp blogger
kamu. Jika kamu menggunakan template Kompi Design letakan kode diatas
tepat diatas kode </b:if> sebelum kode <article>. Penempatan
kodenya akan seperti gambar pada berikut ini.