Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Conditional thumbnail for categories -->
- <div class="excerpt-thumb">
- <?php if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail())) : ?>
- <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
- <?php the_post_thumbnail('excerpt-thumbnail', 'class=alignleft'); ?>
- </a>
- <?php else :?>
- <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
- <img class="alignleft" src="<?php echo get_stylesheet_directory_uri(); ?>/images/<?php $category = get_the_category(); echo $category[0]->slug; ?>.png" />
- <?php endif;?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement