wpexplorer

Office Highlight link around image

Jul 31st, 2012
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. /********* OLD CODE **********/
  2. <div class="hp-highlight <?php if($third_count=='3') { echo 'highlight-third'; } ?> <?php if($fifth_count=='5') { echo 'highlight-fifth'; } ?>">
  3. <?php if(!empty($featured_image)) { ?>
  4. <img src="<?php echo $featured_image[0]; ?>" title="<?php the_title(); ?>" class="hp-highlight-img" />
  5. <?php } ?>
  6. <h3><?php if(!empty($hp_highlights_url)) { ?><a href="<?php echo $hp_highlights_url; ?>" title="<?php the_title(); ?>" target="_<?php echo $hp_highlights_url_target; ?>"><?php the_title(); ?></a><?php } else { the_title(); } ?></h3>
  7. <?php the_content(); ?>
  8. </div>
  9. <!-- /hp-highlight -->
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16. /******** EDITED CODE ************/
  17.  
  18. <div class="hp-highlight <?php if($third_count=='3') { echo 'highlight-third'; } ?> <?php if($fifth_count=='5') { echo 'highlight-fifth'; } ?>">
  19. <?php if(!empty($hp_highlights_url)) { ?><a href="<?php echo $hp_highlights_url; ?>" title="<?php the_title(); ?>" target="_<?php echo $hp_highlights_url_target; ?>">
  20. <?php if(!empty($featured_image)) { ?>
  21. <img src="<?php echo $featured_image[0]; ?>" title="<?php the_title(); ?>" class="hp-highlight-img" />
  22. <?php } ?>
  23. <h3><?php the_title(); ?></a><?php } else { the_title(); } ?></h3>
  24. <?php the_content(); ?>
  25. </div>
  26. <!-- /hp-highlight -->
Advertisement
Add Comment
Please, Sign In to add comment