Membuat Kutipan di Posting WordPress

17 Desember 10

Beberapa minggu yang lalu saya memposting sebuah artikel berjudul Mengoptimalkan “Custon Field” WordPress, yang artikelnya berada disini. Namun setelah kita memanggil value dari Custom Filed (Ruas Tersuai) tersebut kita akan mengaturnya dengan CSS di dalam halam baca posting kita.
Sebagi contoh kita akan membuat petikan kutipan dari seseorang untuk kita masukkan ke dalam posting kita, hasil akhir tampilan pada saat kita membaca posting adalah sebagai berikut.


Nah maka kita perlu menambahkan script pada single.php dan masukkan pada looping.
Memanggil Custom Field

<span class="kutipan"><?php
$mykey_values = get_post_custom_values('Kata Kunci');
foreach ( $mykey_values as $key => $value ) {?>
<?php echo $value; ?>
<?php 
 }?>
</span>

Sisi CSS

span.kutipan{
float:right; /* agar kutipan berada di sisi kanan */
width:200px; /* sesui selera */
height:200px;/* sesui selera */
border:1px solid #ccc; /* memberi batas berbentuk kotak */
padding:5px; /*agar teks tidak berhimpit dengan border/ ada jeda */
}

Oke, selamat mencoba. Semoga lekas sembuh !

15 responses to “Membuat Kutipan di Posting WordPress”

  1. kang yasin mengatakan:

    etak-etake niliki blog-ke sedulur lah…jo kelalen…

  2. Blogiztic mengatakan:

    masih kurang paham nih,bos…hehehehe…

  3. rochsid tehape mengatakan:

    bagian mana yg kurang paham?

  4. Dona Alfian mengatakan:

    tanya lagi, itu bisa di pakai untuk keperluan lain kan om, semisal buat nampilin berita yang lagi populer atau sering dikunjungi, apakah pemberian kata kunci itu itu di bagian “value” cunstum fieldnya… atau gemana om. “modetanya bener nich” biar lebih fasih pakenya ane om… thanks jawabannya…

  5. rochsid tehape mengatakan:

    @Dona… itu sama kayak custom field yang di posting sebelumnya.. kalo tadi cara pakenya, kalo ini adalah contoh penggunaanya..
    kalo buat nampilin berita populer ga pake value custom field tapi pake fungsi yg ngitung jumlah comment gitu.

  6. Dhani mengatakan:

    hmm.. ok dicoba, terlihat menarik ok sip thanks info nya mas..

  7. Wow! After all I got a website from where I know how to truly get useful facts regarding my study and knowledge.

  8. Your means of describing all in this post is truly pleasant, eery one be able to without
    difficulty understand it, Thanks a lot.

  9. Thanks designed for sharing such a pleasant thought, post is nice, thats why i have read it entirely

  10. mebek jati jepara mengatakan:

    kalau tidak di tambahkan kutipan teks juga gak apa apakan….

  11. Do you mind if I qujote a couple of your articles as long as
    I provide credit and sourcess back to your webpage? My website is in the exact same area of
    inteest as yours and mmy visitors would truly benefit from some of the information you provide here.

    Please let me know if this okay with you. Many thanks!

  12. fenoboci diet plan mengatakan:

    If some one wishes expert view about blogging afterward i propose
    him/her to pay a visit this blog, Keep up the good work.

  13. That is a great tip especially to those new to the blogosphere.
    Brief but very accurate info… Many thanks for sharing
    this one. A must read post!

  14. This blog was… how do you say it? Relevant!! Finally I’ve found something
    which helped me. Appreciate it!

  15. Pjd6 mengatakan:

    Excellent article I relished studying this and
    I defiantly will recombed this short article toward my close friends in addition I will include in the direction of post this upon Fb, twitter and further.
    I really feel such as this need to be shared in the course of the internet.
    I’ve been inside the technological know-how marketplace for pertaining to a 10 years and
    I often get pleasure from looking at contemporary article content that
    might probably help me be a lot more professional inside my sector.
    I sense together with I got a lot out of what your self wrote and I’m energized to proportion this with my loved ones and mates.

Tinggalkan Balasan