Guest User

Untitled

a guest
May 25th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. <?php
  2. /**
  3. * Gallery Single
  4. *
  5. * @package Product
  6. */
  7.  
  8. if ( has_post_thumbnail( $post->ID ) ) {
  9. $featured = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'detail-header' );
  10. $image = $featured[0];
  11. }
  12.  
  13. get_header(); ?>
  14. <section id="gallery-detail">
  15. <div class="gallery-detail-image">
  16. <?php if ( has_post_thumbnail( $post->ID ) ): ?>
  17. <img src="<?php echo $image; ?>" alt="<?php the_title(); ?>">
  18. <?php endif ?>
  19. <?php
  20. $points = get_post_meta( get_the_id(), 'detail_map', true );
  21. $pointCount = 1;
  22. ?>
  23. <?php if ( count( $points ) && $points != "" ): ?>
  24. <a href="#" id="mobile-detail-link" class="show-on-phone"><span>View Custom Upgrades</span></a>
  25. <?php endif ?>
  26. <div id="detail-box-container" class="vertical-container">
  27. <div class="vertical-center">
  28. <a href="#" id="detail-container-close" class="close-button"></a>
  29. <?php foreach ($points as $point): ?>
  30. <div class="detail box-<?php echo $pointCount; ?>" style="top:<?php echo $point['ypos']; ?>%; left:<?php echo $point['xpos']; ?>%;">
  31. <a href="#box-<?php echo $pointCount; ?>"><span></span></a>
  32. </div>
  33. <div id="box-<?php echo $pointCount; ?>" class="detail-box">
  34. <div class="detail-box-content">
  35. <div class="vertical-container">
  36. <div class="vertical-center">
  37. <h5><?php echo $point['title']; ?></h5>
  38. <p>
  39. <?php echo nl2br( $point['details'] ); ?>
  40. </p>
  41. <a href="#" class="close-button"></a>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <?php $pointCount++; endforeach; ?>
  47. </div>
  48. </div>
  49. </div> <!-- End of Gallery Detail Image -->
  50. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment