nambah timthumb
-
aku mencoba menambahkan fungsi timthumb pada template.
akum ngambil kode seperti berikut
` <?php // This will show the image and link the image to the post. Alter the width and height (in both places) to your needs. ?><?php if ( get_post_meta($post->ID, ‘thumb’, true) ) { ?>
<div class=”postthumb”>
” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><img src=”<?php bloginfo(‘template_directory’); ?>/scripts/timthumb.php?src=<?php echo get_post_meta($post->ID, “thumb”, $single = true); ?>&h=150&w=150&zc=1″ alt=”<?php the_title(); ?>” width=”150″ height=”150″ />
</div>
<?php } ?>`
masalahnya dengan pemakaian kode tersebut, tumbnail hanya akan muncul bila kita memasukan kata kunci “thumb” pada Custom Fields.
yang aku mau bila kita tidak memasukan kata kunci tersebut ada gambar default yang akan muncul sebagai ganti. kode apa ya yang harus aku tambahkan??makasih bantuannya….
- Topik ‘nambah timthumb’ tertutup untuk balasan baru.