wpexplorer

Victoria Disable Featured Image On Portfolio Posts w/ Slides

Oct 3rd, 2011
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. /******** OLD CODE *********/
  2.  
  3.  
  4. <a href="<?php echo $full_size[0]; ?>" data-rel="prettyPhoto" title="">
  5. <img src="<?php echo $thumbnail[0]; ?>" alt="" width="627" height="400" />
  6. </a>
  7.  
  8.  
  9. /******** New CODE *********/
  10.  
  11.  
  12. <?php
  13. //check if first slider meta is blank
  14. if(get_post_meta($post->ID, 'victoria_portfolio_slider_1', true) =='') {
  15. //if blank show featured image
  16. ?>
  17. <a href="<?php echo $full_size[0]; ?>" data-rel="prettyPhoto" title="">
  18. <img src="<?php echo $thumbnail[0]; ?>" alt="" width="627" height="400" />
  19. </a>
  20. <?php } ?>
  21.  
Advertisement
Add Comment
Please, Sign In to add comment