Cara Cepat Memasang Witged Readmore Otomatis Di Blogspot

cara membuat read more otomatis

Untuk memasang widget read more ini pun tidak terlalu sulit. Seperti biasa, sobat harus melakukan Login di Blogger,kemudian pilih menu Template. 

Selanjutnya pilih Edit HTML dan selanjutnya karna tampilan blogger sekarang terupdate jadinya gak ada expand widget langsung saja sahabat Cari kode script </head>. Untuk mempermudahkan pencarian, gunakan selalu Control+F atau tombol F3. 
Setelah ketemu, ganti kode tersebut dengan kode script di bawah : 
 
<script type='text/javascript'> var thumbnail_mode = &quot;no-float&quot; ; summary_noimg = 430; summary_img = 340; img_thumb_height = 100; img_thumb_width = 120; </script>
    <script type='text/javascript'>
    //<![CDATA[
    function removeHtmlTag(strx,chop){
    if(strx.indexOf("<")!=-1)
    {
    var s = strx.split("<");
    for(var i=0;i<s.length;i++){
    if(s[i].indexOf(">")!=-1){
    s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
    }
    }
    strx = s.join("");
    }
    chop = (chop < strx.length-1) ? chop : strx.length-2;
    while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
    strx = strx.substring(0,chop-1);
    return strx+'...';
    }
    function createSummaryAndThumb(pID){
    var div = document.getElementById(pID);
    var imgtag = "";
    var img = div.getElementsByTagName("img");
    var summ = summary_noimg;
    if(img.length>=1) {
    imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="'+img[0].src+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
    summ = summary_img;
    }
    var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>';
    div.innerHTML = summary;
    }
    //]]>
    </script>  
 </head>


Langkah selanjutnya adalah cari kode <data:post.body/>, lalu ganti kode tersebut dengan kode yang ada di bawah ini. Perhatikan, kode script <data:post.body/> dalam sebuah template, mungkin terdapat dua atau tiga buah kode script yang seperti ini. Sobat bisa mencoba untuk mengganti secara satu persatu. Dan pada template blog yang ini, kode scrip <data:post.body/> yang saya gantikan adalah yang kedua. 

<b:if cond='data:blog.pageType != &quot;item&quot;'>
<div expr:id='&quot;summary&quot; + data:post.id'><data:post.body/></div>
<script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);
</script>
<span class='rmlink' style='float:right;padding-top:20px;'>
<a expr:href='data:post.url'> <b> readmore</b> &#187;&#187;&#160;&#160; </a></span>
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/>
</b:if>

Setelah selesai, sobat bisa mencoba mengklik Pratinjau untuk melihat hasil editannya.

Komentar

  1. Kurus atau Gendut adalah pilihan, tapi makan enak adalah kebutuhan.
    Yuks mari makan >> Aneka Resep makanan, minuman dan camilan praktis,
    cocok untuk sehari hari dan jualan. Berbagai resep untuk pola hidup sehat.
    Monggo mampir

    BalasHapus
  2. Take professional expert help for Xplan software Report and many more. Best Assignment services in Australia, globally trusted, instant Support, Plag free solution, 100% safe, order now!

    BalasHapus
  3. Take professional expert help for Geotechnical Minerals Numerical and many more. Best Assignment services in Australia, globally trusted, instant Support, Plag free solution, 100% safe, order now!

    BalasHapus
  4. Take professional expert help for Analysis of a drug bound to a G protein-coupled receptor and many more. Best Assignment services in Australia, globally trusted, instant Support, Plag free solution, 100% safe, order now!

    BalasHapus
  5. I am glad i got to find your THIS site. I have been examining out a few of your articles and its pretty stuff to read. Visit Our Website Tel U

    BalasHapus
  6. Have been following your blog content for a while now and it has been it has helpful

    BalasHapus
  7. Le calze della Calza Befana di PETTI Artigiani Italiani sembrano davvero un tributo all'arte e all'eccellenza artigianale italiana. Immagino che siano realizzate con materiali di alta qualità e che ogni dettaglio sia curato con grande precisione per offrire uno stile raffinato e lussuoso.

    BalasHapus
  8. Hello, everybody I’m Alina Rose I wanna saw your post that’s very interesting and very pretty. Open Calculator. I’ve learned some good things here keep it up I’m waiting for your next useful blog thank you. Duplicate Bill,

    BalasHapus
  9. In the heart of a bustling marketplace, the air was alive with a symphony of sounds and scents. Colorful stalls adorned with vibrant fabrics and exotic spices created a kaleidoscope of textures and hues. Street vendors, their voices a melodic chorus, called out to passersby, enticing them with the promise of culinary delights and handcrafted treasures. The energy of the crowd, a vibrant dance of diverse cultures and languages, permeated the atmosphere. Amidst the hustle and bustle, a hidden gem of a cafe beckoned with the aroma of freshly ground coffee and the promise of a quiet respite. As the sun dipped below the skyline, casting a warm glow over the bustling scene, the marketplace transformed into a captivating spectacle of sensory delights, where the spirit of community and commerce converged in a lively celebration of life.6movies

    BalasHapus

  10. In the twilight hours, the cityscape transformed into a tapestry of glittering lights, each building a beacon in the urban constellation. The streets, now aglow with the warm hues of streetlamps and neon signs, hummed with the nocturnal pulse of a metropolis coming to life. A lone musician on a street corner painted melodies on the canvas of the night, adding a soulful soundtrack to the urban symphony. As pedestrians weaved through the labyrinth of alleys, the scent of street food wafted through the air, tempting passersby with an array of flavors. In the midst of the city's ceaseless motion, pockets of stillness could be found – quiet courtyards and hidden gardens where the city's heartbeat seemed to slow, inviting those who wandered to savor the enchantment that lingered beneath the surface of the urban expanse. moviesjoy plus



    BalasHapus

  11. In the twilight hours, the cityscape transformed into a tapestry of glittering lights, each building a beacon in the urban constellation. The streets, now aglow with the warm hues of streetlamps and neon signs, hummed with the nocturnal pulse of a metropolis coming to life. A lone musician on a street corner painted melodies on the canvas of the night, adding a soulful soundtrack to the urban symphony. As pedestrians weaved through the labyrinth of alleys, the scent of street food wafted through the air, tempting passersby with an array of flavors. In the midst of the city's ceaseless motion, pockets of stillness could be found – quiet courtyards and hidden gardens where the city's heartbeat seemed to slow, inviting those who wandered to savor the enchantment that lingered beneath the surface of the urban expanse. prosportsdaily



    BalasHapus

Posting Komentar

Postingan populer dari blog ini

Yamaha Terbaru Dengan Mesin 50cc