Advertisement
Guest User

GreenLPtemplate

a guest
May 9th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Landing Page
  4. */
  5. ?>
  6.  
  7. <body <?php body_class(); ?>>
  8.  
  9. <?php get_header("landing"); ?>
  10.  
  11. <div class="page-template">
  12. <?php if (have_posts()) : ?>
  13.  
  14. <?php while (have_posts()) : the_post(); ?>
  15. <div id="top-pic">
  16. <?php the_post_thumbnail('page');?>
  17. </div><!--/top-pic -->
  18. <div class="left-col">
  19.  
  20.  
  21. <h1><?php the_title()?></h1>
  22.  
  23. <div class="content"><?php the_content();?></div>
  24.  
  25.  
  26.  
  27. <?php
  28.  
  29. $parent = $post->post_parent;
  30. if($parent):?>
  31. <div class="services">
  32. <h1>Related</h1>
  33. <div class="blocks">
  34. <?php
  35.  
  36. $args = array(
  37. 'post_type'=>'page',
  38. 'numberposts'=>-1,
  39. 'post_parent'=>$parent,
  40. 'order'=>'asc',
  41. 'orderby'=>'menu_order',
  42. 'post__not_in'=>array($post->ID),
  43. 'posts_per_page'=>6
  44. );
  45.  
  46. $the_query = new WP_Query( $args );
  47.  
  48. // The Loop
  49. while ( $the_query->have_posts() ) : $the_query->the_post();
  50. ?>
  51. <div class="block">
  52. <div class="title-arrow"></div>
  53. <h3><a href="<?php the_permalink(); ?>" title="<?php the_title();?>"><?php the_title();?></a></h3>
  54. <?php the_excerpt();?>
  55. </div>
  56.  
  57. <?php
  58. endwhile;
  59.  
  60. // Reset Post Data
  61. wp_reset_postdata();
  62. ?>
  63. </div>
  64. <div class="fix"></div>
  65. <a class="all-services-link" href="<?php echo get_permalink($parent);?>">See All �</a>
  66.  
  67. </div>
  68.  
  69. <?php
  70.  
  71. endif;
  72. ?>
  73. </div>
  74.  
  75.  
  76. <div class="fix"></div>
  77. <?php endwhile; ?>
  78.  
  79. <?php endif; ?>
  80. </div>
  81.  
  82. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement