<?php
/*
Template Name: Index Page
*/
?>
<?php get_header(); ?>
<?php $about = new WP_Query( 'pagename=home' ); ?>
<?php if( $about->have_posts() ) : $about->the_post(); ?>
<?php the_content(); ?>
<?php endif; ?>
<?php $service = new WP_Query( 'pagename=service' ); ?>
<?php if( $service->have_posts() ) : $service->the_post(); ?>
<?php the_content(); ?>
<?php endif; ?>
<?php $portfolio = new WP_Query( 'pagename=portfolio' ); ?>
<?php if( $portfolio->have_posts() ) : $portfolio->the_post(); ?>
<?php the_content(); ?>
<?php endif; ?>
<?php get_footer(); ?>
The above code works but it generates a space between one page and another how do I remove it?