Cara Membuat Widget Read More Otomatis Di Blogspot

COUNTER

Salah satu cara membuat widget read more otomatis di Blogspot yang menurut saya yang paling bagus adalah yang akan saya lampirkan kode script widgetnya di bawah ini., setelah saya lama mencari-cari kode script yang cocok maka script ini yang bisa pas dengan blog saya. Pada tampilan
default homepage, artikel-artikel yang terpublish akan terpampang memanjang ke bawah. 

Berkat adanya widget readmore otomatis, tampilan blog  akan kelihatan lebih rapi dan enak dipandang. 
Nah, untuk memasang widget read more ini pun tidak terlalu sulit. Seperti biasa, sobat harus melakukan Login di Blogger,kemudian pilih menu Template. 

cara membuat read more otomatis
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. Dan jika berhasil, sobat bisa menyimpan hasil editannya dengan mengklik Simpan Template. Selamat mencoba dan semoga berhasil.

Komentar

  1. Thanks for posting your blog. Your content is really informative for us..

    Wall stickers for kids
    Home Decor

    BalasHapus
  2. You Can Also Write or Add Movie Site in Your Blog Also Thanks For This Type of Great Content..
    FilmyZilla
    Katmovie
    KatmovieHD

    BalasHapus
  3. budyy you always write a great article i always love your articles..
    Insuloan
    Newshind
    Cois

    BalasHapus
  4. Don't worry if you are wondering to choose somewhere to take a short trip, come here things to do

    BalasHapus
  5. Don't worry if you are wondering to choose somewhere to take a short trip, come here things to do

    BalasHapus
  6. White Label SEO Reseller

    Local SEO Reseller in the US is a service that helps businesses improve their search engine rankings for local search queries. Local SEO Reseller companies provide a range of services, including local keyword research, on-page optimization, directory listings, and Google My Business optimization. By partnering with a Local SEO Reseller, businesses can improve their visibility in local search results, attract more local customers, and increase their revenue.

    Best SEO consultants in Las Vegas

    Las Vegas has a number of SEO consultants who can help businesses improve their online presence and search engine rankings. Some of the top SEO consultants in Las Vegas include Top Rating SEO, Nonbrand, and Infront Webworks, each of whom bring years of experience and expertise to help their clients succeed in the highly competitive world of SEO.

    SEO expert business in Ontario

    Ontario is home to several SEO expert businesses that help businesses improve their online presence and search engine rankings. Some of the top SEO expert businesses in Ontario include Nova Solutions, TechWyse, and Ignite Digital, each of which provides customized SEO solutions to meet the specific needs of their clients. These businesses offer a range of services, including keyword research, on-page optimization, link building, content creation, and more, to help businesses attract more traffic to their websites and convert them into customers. With their expertise and experience, these SEO expert businesses help businesses achieve their online marketing goals and stay ahead of the competition.

    BalasHapus
  7. If you are looking for finance & business operation in uae you can check here for more details

    BalasHapus
  8. This post is so well researched and well written. I learned so much from it, and I appreciate the effort you put into creating such a detailed piece I'm definitely going to try out some of the things you suggested. Thank you. Adding some of these plants to your living space can help you breathe easier and feel more refreshed
    croton plant
    petunia flower
    dianthus chinensis
    Plants online in india
    bougainvillea
    mango tree
    ashok tree
    succulent plants
    rose plant
    adenium obesum
    monstera

    BalasHapus
  9. budyy you always write a great article i always love your articles..
    Jersey Boys Tickets
    Jersey Boys Theatre Tickets

    BalasHapus
  10. Implement a browser extension that makes it easy for users to download videos directly from the website they are browsing MP4 video downloader.

    BalasHapus
  11. KSI and Logan Paul, two well-known YouTube stars, worked together to create the Prime Hydration sports drink. In January 2023, they announced the drink’s arrival on Instagram Live.

    Prime Hydration is a hydration drink, as the name would imply. The beverage took almost six months to prepare.
    prime hydration
    Logan Paul & KSI Launch Prime Drink Ambassador Program
    Did KSI Leave Prime? Explaining The Surprising Story
    Another Big Supermarket Stocking Prime Drinks In Stores – But There’s A Catch
    Logan Paul Reveals How Much Money Has Made From His Energy Drink Prime
    New KSI Orange Mango Flavor Prime Hydration Limited Edition!

    BalasHapus
  12. KSI and Logan Paul, two well-known YouTube stars, worked together to create the Prime Hydration sports drink. In January 2023, they announced the drink’s arrival on Instagram Live.

    Prime Hydration is a hydration drink, as the name would imply. The beverage took almost six months to prepare.
    prime hydration
    Logan Paul & KSI Launch Prime Drink Ambassador Program
    Did KSI Leave Prime? Explaining The Surprising Story
    Another Big Supermarket Stocking Prime Drinks In Stores – But There’s A Catch
    Logan Paul Reveals How Much Money Has Made From His Energy Drink Prime
    New KSI Orange Mango Flavor Prime Hydration Limited Edition!

    BalasHapus
  13. If you are looking for finance & Power Platform in uae you can check here for more details

    BalasHapus
  14. 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

Posting Komentar

Postingan populer dari blog ini

Penyelaras Pendidikan dan Pekerjaan itu adalah Kita

Cara Memasang Breadcrumb Navigasi Untuk Blogspot

Cara Cepat dan Mudah Memasang Histats Di Blogspot