Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( is_single($post->ID) && in_category('141') && has_post_thumbnail( $post->ID )) :
- echo get_the_post_thumbnail( $post->ID, 'masthead' );
- else : ?>
- <?php $newer = new WP_Query('post_type=headers&posts_per_page=5&orderby=rand'); while ($newer->have_posts()) : $newer->the_post(); ?>
- <div>
- <?php if ( get_post_meta($post->ID, 'Link URL', true) ) : ?>
- <a href="<?php echo get_post_meta($post->ID, 'Link URL', true) ?>" rel="bookmark">
- <?php the_post_thumbnail('masthead'); ?>
- </a>
- <?php else : ?>
- <?php the_post_thumbnail('masthead') ;?>
- <?php endif; ?>
- </div>
- <?php endwhile; ?>
- </div>
- <?php endif; ?>
Add Comment
Please, Sign In to add comment