Cara buat random post + gambar thumbnail di blog tanpa edit html

Cara buat random post + gambar thumbnail di blog tanpa edit html
Assalamualikum Warahmatullahi wabarakatu kembali lagi di blog www.artikelcara.xyz kali ini Saya akan kasih tutorial Cara buat random post atou istilah postingan di acak acak sendiri seperti populer post tapi kalou random post postingan nya di acak acak atou berbeda.

BACA JUGA Cara mudah membuat contact me di bloggers


Rendom post berfungsi untuk menarikkan pengunjung untuk melihat artikel blog nya.
Untuk cara menambahkan random Post kalian tinggal buka menu Tata Letak buat tambahkan Gadget HTML/JAVASCRIPT


Tambahkan script dibawah ini
<style>
#random-posts img {
    border-radius: 10px;
    float: left;
    margin-right: 8px;
    width: 75px;
    height: 75px;
    background-color: #F5F5F5;
    padding: 3px;
    transition: all 0.2s linear 0s;
}
#random-posts img:hover {
    opacity: 0.6;
}
ul#random-posts {
    list-style-type: none;
    padding: 0px;
}
#random-posts a {
    font-size: 12px;
    text-transform: uppercase;
    padding: 0px auto 5px;
}
#random-posts a:hover {
    text-decoration: none;
}
.random-summary {
    font-size: 11px;
    background: none;
    padding: 5px;
    margin-right: 8px;
}
#random-posts li {
    margin-bottom: 10px;
    border-bottom: 1px solid #EEEEEE;
    padding: 4px;
}
</style>
<ul id='random-posts'>
<script type='text/javaScript'>
var randomposts_number = 4;
var randomposts_chars = 0;
var randomposts_details = 'no';
var randomposts_comments = 'Comments';
var randomposts_commentsd = 'Comments Disabled';
var randomposts_current = [];
var total_randomposts = 0;
var randomposts_current = new Array(randomposts_number);
function randomposts(json) {
    total_randomposts = json.feed.openSearch$totalResults.$t
}
document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&max-results=0&callback=randomposts\"><\/script>');
function getvalue() {
    for (var i = 0; i < randomposts_number; i++) {
        var found = false;
        var rndValue = get_random();
        for (var j = 0; j < randomposts_current.length; j++) {
            if (randomposts_current[j] == rndValue) {
                found = true;
                break
            }
        };
        if (found) {
            i--
        } else {
            randomposts_current[i] = rndValue
        }
    }
};
function get_random() {
    var ranNum = 1 + Math.round(Math.random() * (total_randomposts - 1));
    return ranNum
};
</script>
<script type='text/javaScript'>
function random_posts(json) {
    for (var i = 0; i < randomposts_number; i++) {
        var entry = json.feed.entry[i];
        var randompoststitle = entry.title.$t;
        if ('content' in entry) {
            var randompostsnippet = entry.content.$t
        } else {
            if ('summary' in entry) {
                var randompostsnippet = entry.summary.$t
            } else {
                var randompostsnippet = "";
            }
        };
        randompostsnippet = randompostsnippet.replace(/<[^>]*>/g, "");
        if (randompostsnippet.length < randomposts_chars) {
            var randomposts_snippet = randompostsnippet
        } else {
            randompostsnippet = randompostsnippet.substring(0, randomposts_chars);
            var whitespace = randompostsnippet.lastIndexOf(" ");
            randomposts_snippet = randompostsnippet.substring(0, whitespace) + "&#133;";
        };
        for (var j = 0; j < entry.link.length; j++) {
            if ('thr$total' in entry) {
                var randomposts_commentsnum = entry.thr$total.$t + ' ' + randomposts_comments
            } else {
                randomposts_commentsnum = randomposts_commentsd
            }; if (entry.link[j].rel == 'alternate') {
                var randompostsurl = entry.link[j].href;
                var randomposts_date = entry.published.$t;
                if ('media$thumbnail' in entry) {
                    var randompoststhumb = entry.media$thumbnail.url
                } else {
                    randompoststhumb = "http://3.bp.blogspot.com/-5SoVe1K6JSk/Utl0OOmucAI/AAAAAAAAF6E/hQghgD_EJdQ/s1600/no_thumb.png"
                }
            }
        };
        document.write('<li>');
        document.write('<a href="' + randompostsurl + '" rel="nofollow"><img alt="' + randompoststitle + '" src="' + randompoststhumb + '"/></a>');
        document.write('<div><a href="' + randompostsurl + '" rel="nofollow">' + randompoststitle + '</a></div>');
        if (randomposts_details == 'yes') {
            document.write('<span><div class="random-info">' + randomposts_date.substring(8, 10) + '.' + randomposts_date.substring(5, 7) + '.' + randomposts_date.substring(0, 4) + ' - ' + randomposts_commentsnum) + '</div></span>'
        };
        document.write('<br/><div class="random-summary">' + randomposts_snippet + '</div><div style="clear:both"></div></li>')
    }
};
getvalue();
for (var i = 0; i < randomposts_number; i++) {
    document.write('<script type=\"text/javascript\" src=\"/feeds/posts/default?alt=json-in-script&start-index=' + randomposts_current[i] + '&max-results=1&callback=random_posts\"><\/script>')
};
</script>
</ul>
Sekarang kalian tinggal klik simpan untuk menampilkan beberapa artikel yang akan muncul edit script di, var randomposts_number = 4;    ganti sesuai keinginan kalian selamat Mencoba Enjoy... Seputar Blog

3 Responses to "Cara buat random post + gambar thumbnail di blog tanpa edit html "

  1. Hi everyone are you looking for a professional binary, forex and Bitcoin broker/manager who will guide and help manage your trade and help you earn meaningful profits all within seven days contact Mr Barry Silbert now for your investment plan. For he has helped me to earn 10,250 USD just with a little investment capital and with the aid of his trading software system that brings forth good trading signals i was able to trade and cash out on time and am still trading with him, if you need his assistance on how to recover your lost investment in bitcoin/binary Contact him now on whatsaap +447508298691. or contact him on his email address Email: Barrysilbert540 @ gmail.com. [WITH MR BARRY I BELIEVE THERE ARE STILL GOOD INDIVIDUALS WHO STILL HAVE GOOD INTENTION TO OTHERS. ONCE AGAIN THANKS MR BARRY.]

    ReplyDelete
  2. Hello everyone , here’s your opportunity for you to achieve your dreams of being a multi million dollar rich through trading , I once loss all I got through trading but was fortunate to come across a woman with great virtue and selfless heart (Doris ) i was introduce to her masterclass strategy while searching online which has revived me of all my losses and made me gain more and more . With her unique strategy you are entitled to daily signals and instant withdraw ,be rest assured of getting a refund of all your loss investment with any platform that has denied you in one way or the other in getting your money . Mrs Doris masterclass strategy is simply the best for beginners and those that are finding it difficult to succeed through trading she’ll help you with just a simple step . Email her ( Dorisashley52@Gmail.com) WhatsApp +1 516 494 0313

    ReplyDelete
  3. The crypto Currency Authorities should monitor every Brokers and Account Managers activities, I lost over $230,000 to unregulated Brokers who convinced me into investing my capital. After some successful trade and my profit increased I make a withdrawal request but surprisingly all my withdrawal request was declined , I contacted their customer service unit but i was not given a meaningful Reason why my request was declined. I tried all I could to withdraw my fund but no solution , at the end I lost all my capital without a single profit return .In search for help on how to get my money back I was directed to contact Mr Nathan Harold who work with crypto Currency authorities, I contacted him and explained my situation to him , he requested for some details about the broker and concerning my investment, I forwarded all the details to him. It was all like a dream , through him I was able to get back all my money , please don’t sit back and cry when you facing difficulties in withdrawing your profit or you totally lost your funds to any Broker or Account Manager , kindly contact Mr Nathan through his email address: nathanharold076@gmail.com, I assure you a successful funds recovery.

    ReplyDelete
Catatan Untuk Para Jejaker
  • Mohon Tinggalkan jejak sesuai dengan judul artikel.
  • Tidak diperbolehkan untuk mempromosikan barang atau berjualan.
  • Dilarang mencantumkan link aktif di komentar.
  • Komentar dengan link aktif akan otomatis dihapus
  • *Berkomentarlah dengan baik, Kepribadian Anda tercemin saat berkomentar.

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel