Hi,
I have the following code for my index.php but it doesnt include pagination. I would like to paginate every 5 blog posts
<?php get_header(); ?>
<?php
global $more;
$more = 0;
?>
<!-- BEGIN Main content ================================================== -->
<?php if (!(have_posts())) { ?><div class="span9"><h2>There is no posts</h2></div><?php } ?>
<div class="span6" style="margin-right: 0px">
<!-- BEGIN Heading ================================================== -->
<div style="background: #FFFFFF; line-height: 2; padding-left: 10px"><p style="color: #ffffff; font-size: 5px;"> </p> </div>
<div style="background: #8d8d8d; line-height: 1; padding: 10px 10px 1px 20px; border-bottom: 1px solid #252525; margin-bottom: -20px">
<p style="color: #ffffff; font-size: 14px; margin-bottom: 10px; font-family: Helvetica, Arial, sans-serif; font-weight: 400; font-weight:bold; text-shadow: 0 1px 1px #000;">Latest News</p>
</div>
<!-- END Heading ================================================== -->
<?php query_posts('category_name="latest-news"'); ?>
<?php if (have_posts()) : while ( have_posts() ) : the_post(); ?>
<?php $large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large'); ?>
<div <?php post_class(); ?>>
<?php if (get_post_meta($post->ID, video, true)){ ?>
<div style="margin-bottom:-5px !important;">
<?php echo get_post_meta($post->ID, video, true); ?>
</div>
<?php }elseif (get_post_meta($post->ID, quoute, true)){ ?>
<div class="view view-first">
<div class="tringle"></div>
<div class="noimage">
<blockquote>
<p><?php echo get_post_meta($post->ID, quoute, true); ?></p>
</blockquote>
</div>
</div>
<?php }elseif(has_post_thumbnail()){ ?>
<div class="view view-first">
<div class="tringle"></div>
<img src="<?php echo $large_image_url[0]; ?>" alt="" />
<div class="mask nolink">
<a href="<?php echo $large_image_url[0]; ?>" rel="prettyPhoto" class="info"></a>
</div>
</div>
<?php }?>
<?php if($data['blog_show_posts_date'] == true ){ ?>
<div class="meta" style="margin-top: 50px">
<span class="meta_date"><?php if($data['blog_show_date_icon'] == true ){ ?><i class="icon-calendar"></i> <?php }?> <strong>Date:</strong> <?php the_time('F j, Y') ?></span> <br><hr><?php if(function_exists(LikePost))LikePost('get'); ?>
<?php }?>
</div>
<div class="descr">
<h4 style="text-transform: uppercase"><a style="text-transform: uppercase; color: #cd1919; font-family: Georgia" href="<?php echo the_permalink(); ?>"><?php the_title(); ?></a></h4>
<?php the_content('<div class="read_more">Read More »</div>', '<img><a style="color: #cd1919">', 'content', false, 'More...', true);?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
<!-- END Main content ================================================== -->
<!-- BEGIN Gallery ================================================== -->
<div class="span3" style="margin-right: 0px;">
<div style="background: #FFFFFF; line-height: 2"><p style="color: #ffffff; font-size: 5px;"> </p </div>
<div style="background: #8d8d8d; line-height: 1; padding: 10px 10px 1px 20px; border-bottom: 1px solid #252525;">
<p style="color: #ffffff; font-size: 14px; margin-bottom: 10px; font-family: Helvetica, Arial, sans-serif; font-weight: 400; font-weight:bold; text-shadow: 0 1px 1px #000;">Photographic Gallery</p>
</div>
</div> <div class="block" style="margin-right: 0px; margin-top: 10px;">
<div class="view view-first" style="width: 100%; padding-left: 0px">
<div class="new"></div>
<div class="tringle"></div>
<p></p>
<img src="wp-content/themes/valor/assets/img/lanfredss.jpg" alt="" />
<div class="mask">
<a href="wp-content/themes/valor/assets/img/lanfredss.jpg" rel="prettyPhoto" class="info"></a>
<a href="#" class="link"></a>
</div>
</div>
<div class="descr">
<blockquote>
<p style="text-align: justify; margin-right: 15px">It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout ...</p>
<h6><a href="#"><strong>View Gallery</strong></a></h6>
</blockquote>
</div>
</div>
</div>
<!-- END Gallery
================================================== -->
<!-- BEGIN Location map
================================================= -->
<div class="span3" style="margin-right: 0px;">
<div style="background: #FFFFFF; line-height: 2"><p style="color: #ffffff; font-size: 5px;"> </p </div>
<div style="background: #8d8d8d; line-height: 1; padding: 10px 10px 1px 20px; border-bottom: 1px solid #252525;">
<p style="color: #ffffff; font-size: 14px; margin-bottom: 10px; font-family: Helvetica, Arial, sans-serif; font-weight: 400; font-weight:bold; text-shadow: 0 1px 1px #000;">Our Location</p>
</div>
</div>
<div class="block" style="margin-right: 0px;">
<iframe width="100%" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="//maps.google.com/maps?q=35.896123,14.510614&z=18&output=embed"></iframe>
</div>
<!-- END Location map
================================================= -->
<div style="background: #FFFFFF; line-height: 2"><p style="color: #ffffff; font-size: 5px;"> </p </div>
<div class="span3" style="margin-right: 0px;">
<div class="HOME_ORDINE_NEL_MONDO" style="margin: auto 0 auto;">
<p style="color: #FFFFFF; margin: 0px; margin-bottom: 5px; padding: 0px; font-size: 1.4em; line-height: 1.3em; font-weight: bold">Around the World</p>
<div style="float:left; width:100px;">
<img src="http://www.orderofmalta.int/wp-content/themes/order_of_malta/images/comuni/bullet_bianco.gif"><a href="http://www.orderofmalta.int/around-the-world/?lang=en&continente=europa" target="_blank">Europe</a> <br>
<img src="http://www.orderofmalta.int/wp-content/themes/order_of_malta/images/comuni/bullet_bianco.gif"><a href="http://www.orderofmalta.int/around-the-world/?lang=en&continente=africa" target="_blank">Africa</a> <br>
<img src="http://www.orderofmalta.int/wp-content/themes/order_of_malta/images/comuni/bullet_bianco.gif"><a href="http://www.orderofmalta.int/around-the-world/?lang=en&continente=america" target="_blank">America </a>
</div>
<img src="http://www.orderofmalta.int/wp-content/themes/order_of_malta/images/comuni/bullet_bianco.gif"><a href="#"></a><a href="http://www.orderofmalta.int/around-the-world/?lang=en&continente=aeo" target="_blank">Asia</a> <br>
<img src="http://www.orderofmalta.int/wp-content/themes/order_of_malta/images/comuni/bullet_bianco.gif"><a href="#"></a><a href="http://www.orderofmalta.int/around-the-world/?lang=en&continente=aeo" target="_blank">Oceania</a>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>
Thanks