Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Landing Page
- */
- ?>
- <body <?php body_class(); ?>>
- <?php get_header("landing"); ?>
- <div class="page-template">
- <?php if (have_posts()) : ?>
- <?php while (have_posts()) : the_post(); ?>
- <div id="top-pic">
- <?php the_post_thumbnail('page');?>
- </div><!--/top-pic -->
- <div class="left-col">
- <h1><?php the_title()?></h1>
- <div class="content"><?php the_content();?></div>
- <?php
- $parent = $post->post_parent;
- if($parent):?>
- <div class="services">
- <h1>Related</h1>
- <div class="blocks">
- <?php
- $args = array(
- 'post_type'=>'page',
- 'numberposts'=>-1,
- 'post_parent'=>$parent,
- 'order'=>'asc',
- 'orderby'=>'menu_order',
- 'post__not_in'=>array($post->ID),
- 'posts_per_page'=>6
- );
- $the_query = new WP_Query( $args );
- // The Loop
- while ( $the_query->have_posts() ) : $the_query->the_post();
- ?>
- <div class="block">
- <div class="title-arrow"></div>
- <h3><a href="<?php the_permalink(); ?>" title="<?php the_title();?>"><?php the_title();?></a></h3>
- <?php the_excerpt();?>
- </div>
- <?php
- endwhile;
- // Reset Post Data
- wp_reset_postdata();
- ?>
- </div>
- <div class="fix"></div>
- <a class="all-services-link" href="<?php echo get_permalink($parent);?>">See All �</a>
- </div>
- <?php
- endif;
- ?>
- </div>
- <div class="fix"></div>
- <?php endwhile; ?>
- <?php endif; ?>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement