Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <!-- So whenever the theme displays the post thumbnail on a page, I want it to display with this code wrapped around it... -->
  2.  
  3. <?php
  4.  
  5. $caption = get_field( "featured_caption" );
  6.  
  7. ?>
  8. <div class="featured-image-wrap">
  9. <div class="featured-image-caption">
  10. <?php if( $caption ) {
  11.  
  12. echo $caption;
  13.  
  14. } ?>
  15. </div>
  16. <?php if ( has_post_thumbnail() ) :
  17. the_post_thumbnail();
  18. endif; ?>
  19. </div>
  20. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement