i been testing something new here while playing with wordpress codes. alright do you see my theme? the latest post and others 4 entry are divided right? the 1st post (latest) were shown at the top. while others 4 entry in column form. this is good in order to make your visitor focus on your latest post instead of older one.
note that this is for wordpress theme only! but that doesnt mean other blog engine can’t use this concept. but of course in different way
here is the quickest and dirties trick to do that.
first, declare a variable named
$divider
before
<?php while (have_posts()) : the_post(); ?>
if (is_home() && !is_paged()) { // set for frontpage only
$divider = 1; //set the variable
while (have_posts()) : the_post();
if ($divider ==1) { echo '<div class="top">;' ?>
...all standard wp codes goes here...
</div>
< ?php } // don't forget to close it
else { echo '<div class="column">'; ?>
...all standard wp codes goes here...
</div>
<?php } // close it again ?>
<?php $divider++; endwhile; //make sure you increase the valud of divider ?>
it will look something like this.got the idea? if you are a person who like to test for something new and “rajin”, you can try to make dynamic alignment for each entry. such as
if ($divider == 1) { post want will be at the top, with background grey, bigger font }
if ($divider == 2 or $divider == 3) { post with be combined in column smaller font }
and so on.. just do experiments with it.
oh ya, this is my new layout. ya i know, it’s plain, but i like it
p/s: this is not K2 mod anymore. i rebuild it based on k2, which mean, i try to make it work look like K2 esspecially the ajax comment 
since there where to many tutorial out there and i have plenty of time, i decided to learn
ajax deeper.now i’m working on my own livesearch.
till then, happy learning to you too!
8 Comments
wah2..dasat hang sekarang..teruskan
..![[thumb] [thumb]](http://wan.pengganas.net/smilies/thumb.gif)
haha. code punya code tak berapa jadi. aku dah ubahsuai sket jadi superb.
yaya, code diatas tidak di cek ada error![[lolx] [lolx]](http://wan.pengganas.net/smilies/lolx.gif)
it just my way to shown a “concept” ehehe
tq bat, akan ku teruskan. sbb bila dah start main ngan wordpress ni, memang takleh nak berenti
aku tgk idea hg ja..tapi tak test lagi..weh aku nak buat theme satu lagi la..untuk personal use..huhu..
lagi banyak code, lagi mantap blog kita… :)
you’re God… Haha!
aku buat ngan several template… senang sket..
Nice.. tau tak mana nak cari themes buatan orang malaysia yang lawa lawa ?
One Trackback
[...] Yeah, the modification of my “Blue Way” theme just a few mile a way from the end. Now I’m going yo rewrite my comment template. By the way, I’m going to correct novatech latest post trick; Here is the corrected code. [...]