Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. function.php:
- add_theme_support( 'post-thumbnails' );
- set_post_thumbnail_size( 100, 100, true );
- =====================
- 2. index.php, tag.php, category.php.
- Letakkan sebelum <?php the_excerpt(''); ?> atau <?php the_content(''); ?>, boleh juga sebelum title
- <?php if ( has_post_thumbnail() ) {
- the_post_thumbnail();
- } else {
- echo '<img src="http://i1147.photobucket.com/albums/o553/jonobones/thumbnaildefault.png" alt="'.get_the_title().'" class="wp-post-image"/>';
- } ?>
- ====================
- 3. style.css
- img.wp-post-image {
- float:left;
- margin-right:5px;
- width:100px;
- height:100px;
- padding:3px;
- border:solid 1px #cccccc; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement