Membuat Asides (sebuah alternatif)
February 10, 2006
Asides merupakan sekumpulan daftar link yang disertai dengan keterangan singkat mengenai link tersebut. Banyak pengguna blog menggunakan Asides dengan alasan ingin men-tautkan suatu link dalam suatu entri blog. Namun, dalam entrian tersebut mereka tak perlu menulis keterangan panjang lebar mengenai link-link tersebut. Asides yang pertama kali dicetuskan oleh Matthew Mullenweg ini, merupakan suatu konsep yang diambil dari feature Quicklinks di Movable Type.
Ada dua cara dalam mengimplementasikan Asides di Wordpress. Cara pertama adalah menaruhnya di bagian post. Cara kedua adalah menaruhnya di sidebar. Asides bukan merupakan suatu plugin, namun lebih kepada code modification dari sejumlah template.
Sebenarnya Wordpress sendiri sudah memberikan tutorial tentang bagaimana cara menambahkan Asides di sebuah blog. Namun, ada beberapa kendala dari tutorial tersebut. Pada tutorial itu, mereka menjelaskan dengan asumsi tag the_loop yang dipakai menggunakan code ini:
Namun, tidak semua template menggunakan kode itu pada template index.php nya (jika Asides ingin digunakan dalam post utama). Karena ada alternatif lain dalam memanggil the_loop seperti misalnya dengan :
Sekarang saya akan menjelaskan bagaimana mengedit file index.php dengan asumsi Anda mempunyai kode the_loop seperti pada kode alternatif ke dua di atas. Tetapi sebelumnya, apa sih tag the_loop itu? Keterangan lengkap tentang the_loop dapat anda baca disini. Berikut ini adalah langkah-langkahnya :
- Backup dulu file index.php di themes Anda. Ini wajib dilakukan.
- Buat kategori baru di wp-admin. Buka Manage - Categories lalu buatlah kategori baru, berikan nama sesuai dengan keinginan Anda, misalnya Asides atau Quicklinks. Hal yang perlu diperhatikan disini adalah nomor ID dari category yang Anda buat tersebut. Ingatlah nomor kategori tersebut.
- Edit file index.php di theme pilihan Anda. Carilah kode ini :
hapus kode tersebut, dan gantilah dengan :
function stupid_hack($str)
{
return preg_replace('|\s*
- |’, ”, $str);
}
ob_start(’stupid_hack’);
foreach ($posts as $post) :
start_wp(); ?>
- Lalu di bawah nya tambahkan kode ini :
- ”
title=”Permalink: wptexturize(strip_tags(stripslashes($post->post_title), ”)); ?>”
rel=”bookmark”>#
- ”
- Cari kode berikut :
hapus, lalu ganti dengan :
- Save file tersebut. Untuk mengganti tampilan dari Asides, Anda dapat mengedit class css nya yaitu linklog , contohnya :
ul.linklog li {
border:1px solid #ff0000;
font:Verdana;
font-size:14pt;
background-color:#ffff00;
}ul.linklog li a {
text-decoration:none;
}
Similar Posts
Comments
Leave a Comment or Trackback this Post
If you would like to make a comment, please fill out the form below.
About
Patrick G. van Diest a.k.a "patvandiest" thinks he can fulfill his "world domination scheme" by writing in this weblog in his spare time. We'll see about that in the upcoming future. Now, just expect writings on random geek things that may interest you. Oh yeah, did you know that he works as web developer on a tech magazine...? More
The Sites
Recently
Recent Comments
- horse smallest: sale horse horse bucking
- SeloJoini: Qualitative resource
- kevevildbuite: Hello Id Like to get somewhere you this unheard-of famed ! How with naming to we try something a...
- Agonrydrery: J.P. Morgan Chase & Co. says it will modify the terms of $70 billion in troubled, mostly...
- play poker: Thanks for a lovely site, I am very impressed :-)
Categories
- Bicycle
- Community
- Daily Notes
- Games
- Hardware
- in Indonesia
- Internet
- iPod
- Linux
- Movies
- Multimedia
- Music
- Quicklinks
- Sidenotes
- Software
- Sports
- Wordpress
Pages
Sidenotes
Okay, life must go on, right? So with the spirit of Sumpah Pemuda and the recent festive of Pesta Blogger 2007. I officially announce that:
It's just around the corner, not very far away.
The reason? Well you can say that I'm getting bored with Wordpress and I want to try something new. But trust me, I won't move it anywhere else in the future, I will use patvandiest.com as my main blog, always. I promise you that!
So please... please update your bookmark, I will forever graceful if you do that. But if you are reading my blog through my Feedburner account, worry not, I will automatically update the link. That goes to my other social networking related link.
I won't delete this blog, though. I will keep it as past archives of my writings.
So, sorry for this inconvinience. I hope you don't mind. See you at my other room.
Sincerely Yours,
Patrick Gerard van Diest
- #
www.patvandiest.com- I definitely will go to Pesta Blogger 2007. I've register there this afternoon, hope they approved my application. Will go with Rifie. It would be fun!
- # - And so begin the brick wars! On the axis side, it's Steve Jobs and its Apple. The Allied side consists of peoples who unlocked their iPhone. But nooo, they're not the only ones. According to Scoble, some regular iPhone user has the same problem too after the update that Apple released. It's getting hotter now. :) - #
- Remember Kubrick's "A Clockwork Orange"? here's behind-the-scenes footage to relive that legendary movie (via Bedazzled)
- # - Ouh yes! know I now the first item in my "to-be-bought" list for Dody when he goes to Singapore next month. The new Dashboard Confessional album "The Shade of Poison Trees" (release date: October 2nd). Yaay!
- # - So I got bored (again) with the last theme. I had to change it, but not much though. So, here it is in it's full glory. - #

