<?php
/*
Template Name: News
*/
get_header();?>
<h1 class="title">news</h1>
<div class="border"></div>
<section class="page news col-md-11">
<?php
$latest_blog_posts = new WP_Query( array( 'posts_per_page' => 1, 'cat' => 6 ) );
if ( $latest_blog_posts->have_posts() ) :
while ( $latest_blog_posts->have_posts() ) :
$latest_blog_posts->the_post();
?>
<div class="post">
<a href="<?php the_permalink(); ?>">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</a>
<?php
the_post_thumbnail( array(500, 500) );
the_content( sprintf(
__( '(more)'),
the_title( '<span class="screen-reader-text">', '</span>', false )
) );
?>
</div>
<?php
endwhile;
endif;
?>
</section>
<?php posts_nav_link(); ?>
<?php get_footer(); ?>
but posts_nav_link() function not working!
sorry my english is poor.
In the template I have this code. I tried also to use a plugin for Page Nav but the Second,Third,Fourth,…pages don’t work.
<?php query_posts( 'posts_per_page=5' ); ?>
<?php
if (have_posts()) : while (have_posts()) : the_post();
?>
MY CODE
<?php endwhile; endif; ?>
<div class="pagination"><p><?php posts_nav_link(' '); ?></p></div>
I’m working in Local with MAMP if it can help to figure it out.
Thanks
]]><?php posts_nav_link(' ','<img src="<?php bloginfo('template_directory'); ?>/images/left.png" />','<img src="<?php bloginfo('template_directory'); ?>/images/right.png" />'); ?>
1 2 3 … 120
120 would be the next page. Do you have any idea how I could implement this?
Thanks!
]]>