Created
May 31, 2013 23:47
-
-
Save jesseschmidt/5688689 to your computer and use it in GitHub Desktop.
Show different thumbnail for posts that are not tagged with tradeshow.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$recent = new WP_Query("cat=11&showposts=2"); while($recent->have_posts()) : $recent->the_post(); | |
if ( has_tag( 'tradeshow' ) ) { | |
echo '<a href="http://demo.com/your_image.jpg">Link Title</a>'; | |
} else { | |
echo '<a href="' . the_permalink() . '">' . get_the_post_thumbnail() . '</a>'; | |
} | |
endwhile; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment