Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.00 KB | None | 0 0
  1. <?php
  2. /* Template Name: Page With Map */
  3. get_header(); ?>
  4.  
  5.     <?php
  6.     $location = get_field('map_location');
  7.      
  8.     if( !empty($location) ):
  9.     ?>
  10.     <div id="map" class="acf-map featured-banner-container">
  11.         <div class="marker" data-lat="<?php echo $location['lat']; ?>" data-lng="<?php echo $location['lng']; ?>"></div>
  12.     </div>
  13.     <?php endif; ?>
  14.  
  15.     <div id="primary" class="content-area">
  16.        
  17.         <main id="main" class="site-main" role="main">
  18.            
  19.             <div class="container">
  20.                 <div class="row">
  21.                     <div class="col-md-12">
  22.  
  23.                         <?php
  24.                         while ( have_posts() ) : the_post();
  25.  
  26.                             get_template_part( 'template-parts/content', 'page' );
  27.  
  28.                             // If comments are open or we have at least one comment, load up the comment template.
  29.                             if ( comments_open() || get_comments_number() ) :
  30.                                 comments_template();
  31.                             endif;
  32.  
  33.                         endwhile; // End of the loop.
  34.                         ?>
  35.  
  36.                     </div>
  37.                 </div>
  38.             </div>
  39.  
  40.         </main><!-- #main -->
  41.  
  42.     </div><!-- #primary -->
  43.  
  44. <?php
  45. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement