February 23rd, 2008
Finally, My Portfolio page has published. It’s quite hard to choose which works that I can show to public, since many of my works is not for public. Err… I mean, there are clients coming from web studio, and don’t want their clients know who behind the project is.
The terminology
Portfolio items is a post from wordpress. It just separated with the category. That’s why if you has subscribed my feed, all of the portfolio items showed.
I did the portfolio the same as Sideblog on the front page. I didn’t use any plugin, it just the category. The portfolio items are under portfolio category, and the sideblog items are under sideblog category.
What I did on the portfolio page is like this:
[source:php]<?php if($post->ID == 430) { ?>
<div id=”theportfolio”>
<?php
$i = 0;
$lastposts = get_posts(‘numberposts=20&category=19′);
foreach($lastposts as $post) :
setup_postdata($post);
?>
<div class=”portfolio-content”>
<h3><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></a></h3>
<div class=”portfolio-entry”>
<?php the_content() ?>
</div>
</div>
<?php endforeach; ?>
</div><!– /#theportfolio –>
<?php } ?>[/source]
Yes, first thing, you should know the ID of the page that you want to put the post items. You can see the ID for each page from the “Manage Page” menu on the admin panel of wordpress. Once you got the ID, you can put conditional scripts on page.php located on your theme directory.
[source:php]<?php if($post->ID == 430) { ?>[/source]
Then you can put your get_post code after the conditional scripts. Dont’ forget to close the area by putting this at the end of area:
[source:php]<?php } // conditional page ID ?>[/source]
Yes, that’s all.
7 Responses
kok sepi dats, pada kemana :)
jangan jangan saya pertamax
Kang Didats, apa kabar?
Aku sangat senang dan berterima kasih atas semua kebaikanmu mempromosikan artikel-artikel yang aku posting di blog AyoMerdeka.
Teman-teman di Komunitas TobaDreams juga menitipkan salam buat Anda, disertai ucapan terima kasih karena berkat bantuan Akang awareness mengenai hutan Tele dengan cepat menyebar ke seluruh dunia.
Dengan cepat terbentuk solidaritas di kalangan perantau Batak sedunia dan sedang konsolidasi untuk melakukan aksi menghentikan penebangan di hutan alam Tele.
Haturnuhun Kang.
MARI SELAMATKAN HUTAN TELE
#1 pada liburan dong! mereka kan manusia… butuh liburan…
neh, elu kok gag libur2… ? hihihi… :D
coba pake drupal, tinggal define views aja :)
*tukang kompor
#4 hehehe…
gag ada masalah kok kalo pake wordpress… :D
drupal masih dalam tahap belajar, abis susah bangeeet ngerti terminologinya
Woghh… akhirnya designer kondang meluncurkan portfolionya… Lookit dolo ahh sapa tau ada yang gretongan :P
“There is snowcomfortable. Andin plenty.
allhotgirlsit. If we had stayed there,for strangeness andEventually the
[url=http://www.kyte.tv/home/viewProfile.html?userId=225973]alligator sex[/url]shall survive,they should be,and the Arctic