Viewing 2 replies - 1 through 2 (of 2 total)
  • as a pure formatting question, this might be better suited for a css forum like https://csscreator.com/forum or similar

    Thread Starter MasterRenny

    (@masterrenny)

    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="https://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.