kalponikoronno

loop for one page lynda

Feb 19th, 2015
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. <?php
  2. /**
  3. * The custom template for the one-page style front page. Kicks in automatically.
  4. */
  5.  
  6. get_header(); ?>
  7.  
  8. <div id="primary" class="content-area">
  9.     <div id="main" class="site-main">
  10.      ‍    <section class="call-to-action">
  11.             <div class="indent">
  12.                 <?php
  13.                 $query = new WP_query( 'pagename=book-an-appointment' );
  14.                 if($query->have_posts()) {
  15.                     while($query->have_posts()) {
  16.                         $query->the_post();
  17.                             echo '<div class="entry-content">';
  18.                                 the_content();
  19.                             echo '<div>';
  20.                     }
  21.                 }
  22.                 wp_reset_postdata();
  23.                 ?>
  24.             </div>
  25.         </section>
  26.     </div>
  27. </div>
  28.  
  29. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment