Title: CSS Thumbnail?
Last modified: August 20, 2016

---

# CSS Thumbnail?

 *  Resolved [MasterRenny](https://wordpress.org/support/users/masterrenny/)
 * (@masterrenny)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/css-thumbnail/)
 * Okay i hope this will make sense,
 * I want to display a thumbnail with a Day on it set by a custom field for that
   post.
 * BUT i want to use this styling
    [http://tut.masterrenny.com/Site%20Bootstrap/post-thumb-style.css](http://tut.masterrenny.com/Site%20Bootstrap/post-thumb-style.css)
 * for the “thumbnail” background, baring in mind it wont actually be a thumbnail
   init self, therefore it wouldnt be set by the feature image.
 * i had been doing it by images, but to make a image for every day takes up space
   and alot of time!
 * [http://www.miniproject.co.uk](http://www.miniproject.co.uk) << thats basically
   what i want to achieve but without the images, done in CSS
 * _[ Please do not bump, that’s [not permitted here](http://codex.wordpress.org/Forum_Welcome#No_Bumping).]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/css-thumbnail/#post-3378932)
 * as a pure formatting question, this might be better suited for a css forum like
   [http://csscreator.com/forum](http://csscreator.com/forum) or similar
 *  Thread Starter [MasterRenny](https://wordpress.org/support/users/masterrenny/)
 * (@masterrenny)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/css-thumbnail/#post-3378966)
 * Figured it out myself
 * In case anyone else wants summa long the same lines, i used custom fields to 
   set the colour (red, blue…etc) then another custom field for the Day number
 * then coded this
 *     ```
       <?php if (has_post_thumbnail()) : ?>
       		<?php $image = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'feature' ); ?>
       		<img src="<?php echo $image[0]; ?>" alt="<?php the_title(); ?>" width='150' height='150'  />
       		<?php elseif (get_post_meta($post->ID, 'the_day', true)): ?>
       		<div class="thumbs <?php $dayclass = get_post_meta($post->ID, 'day_class', true); echo  $dayclass; ?>"><p>DAY <?php $day = get_post_meta($post->ID, 'the_day', true); echo  $day; ?></p></div>
       		<?php else: ?>
       		<img src="http://www.masterrenny.com/wpcore/wp-content/uploads/2012/11/default150by150.png" alt="<?php the_title(); ?>" width='150' height='150' />
       		<?php endif; ?>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘CSS Thumbnail?’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [MasterRenny](https://wordpress.org/support/users/masterrenny/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/css-thumbnail/#post-3378966)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
